Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6g segfaults in yyparse() with malformed input file #204

Closed
gopherbot opened this issue Nov 15, 2009 · 2 comments
Closed

6g segfaults in yyparse() with malformed input file #204

gopherbot opened this issue Nov 15, 2009 · 2 comments

Comments

@gopherbot
Copy link

by vegard.nossum:

What steps will reproduce the problem?

1. Create a file segfault.go with the following contents (1 line):

func (a b, c d) x ()

2. Run "6g segfault.go"

What is the expected output? What do you see instead?

$ 6g segfault.go 
Segmentation fault

What is your $GOOS?  $GOARCH?

declare -x GOARCH="amd64"
declare -x GOOS="linux"

Which revision are you sync'ed to?  (hg log -l 1)

$ hg log -l 1
changeset:   4015:cb140bac9ab0
tag:         tip
user:        Russ Cox <rsc@golang.org>
date:        Thu Nov 12 14:55:26 2009 -0800
summary:     test/run: unset GREP_OPTIONS


valgrind output suggests something wrong in the parser:

==582== Invalid read of size 8
==582==    at 0x42B87B: yyparse (go.y:1120)
==582==    by 0x42FEC7: p9main (lex.c:91)
==582==    by 0x434038: main (main.c:35)
==582==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 1:

Owner changed to r...@golang.org.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 2:

This issue was closed by revision a338231.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants