First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 65752
Alias:
Product:
Component:
Status: RESOLVED
Resolution: UPSTREAM
Assigned To: GCC Porting Team <gcc-porting@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Eric Shattow <lucent@gmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emergeinfo.txt emerge --info text/plain Eric Shattow 2004-09-28 20:30 0000 2.39 KB Details
OscilGen-prepare.s src/Synth/OscilGen.s: OscilGen::prepare() / gcc 3.3.4 text/plain Eric Shattow 2004-10-13 04:22 0000 6.80 KB Details
OscilGen-prepare.s src/Synth/OscilGen.s: OscilGen::prepare() / 3.4.2 text/plain Eric Shattow 2004-10-13 04:24 0000 11.93 KB Details
OscilGen-prepare.C src/Synth/OscilGen.C: OscilGen::prepare() text/plain Eric Shattow 2004-10-13 04:29 0000 2.87 KB Details
OscilGen.o src/Synth/OscilGen.s: gcc 3.4.2 text/plain Eric Shattow 2004-10-13 13:52 0000 134.76 KB Details
OscilGen.o src/Synth/OscilGen.s: gcc 3.3.4 text/plain Eric Shattow 2004-10-13 13:55 0000 135.96 KB Details
OscilGen.C src/Synth/OscilGen.C text/plain Eric Shattow 2004-10-13 14:02 0000 32.71 KB Details
gdb_output gdb output from zynaddsubfx crash text/plain Eric Shattow 2004-10-13 14:21 0000 6.45 KB Details
OscilGen-OscilGen_prepare.s.diff diff -burN OscilGen-OscilGen_prepare.s-3.3.4 OscilGen-OscilGen_prepare.s-3.4.2 text/plain Eric Shattow 2004-10-13 14:29 0000 9.07 KB Details
gooberirc.log IRC session, #gcc on OFTC text/plain Eric Shattow 2004-10-13 20:08 0000 2.43 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 65752 depends on: Show dependency tree
Bug 65752 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-09-28 18:39 0000
Zyn crashes when you send midi data to it, after being compiled with gcc
3.4.2-r2

nothing else changed, i simply switched compilers with 'gcc-config' to 3.3.4,
recompiled Zyn, and it works.

backtrace: http://paste.phpfi.com/31482

i even tried patching the Zyn makefile to use sensible compiler flags, but
there was no change in behavior (still crashed).

------- Comment #1 From Disenchanted (RETIRED) 2004-09-28 18:55:05 0000 -------
need emerge info
when was gcc-3.4.2-r2 merged? if not after Sept. 21st, please remerge


------- Comment #2 From Eric Shattow 2004-09-28 20:30:33 0000 -------
Created an attachment (id=40681) [details]
emerge --info

------- Comment #3 From Eric Shattow 2004-09-28 21:34:54 0000 -------
remerged gcc 3.4.2-r2, remerged zyn with it.  no change in behavior.  zyn
loads, then when you send midi data or try to play the virtual keyboard, crash!
  it's gotta be a compiler bug.

no crash happens if you gcc-config to a 3.3.x compiler to emerge zyn

------- Comment #4 From Eric Shattow 2004-09-28 22:28:44 0000 -------
maybe it's just me and thom having this problem?     i'm thinking, "glibc bug"

anyways leave this bug open until the next glibc is available in the tree, in case someone else besides thom and i experience trouble.

the work around if you run into this is to compile your zyn with gcc 3.3.4

------- Comment #5 From Eric Shattow 2004-10-01 01:15:34 0000 -------
confirmed by 3 other people. cause is  ?  no idea.   amd64 and ~x86

------- Comment #6 From Eric Shattow 2004-10-13 04:06:06 0000 -------
more info coming.     newer version of Zyn brings forth the same flaw in GCC
3.4.2, and i have some assembler code to share.   compiled with -O0 -S -Wall
flags.

------- Comment #7 From Eric Shattow 2004-10-13 04:22:04 0000 -------
Created an attachment (id=41704) [details]
src/Synth/OscilGen.s: OscilGen::prepare() / gcc 3.3.4

-O0 -Wall -S

------- Comment #8 From Eric Shattow 2004-10-13 04:24:51 0000 -------
Created an attachment (id=41705) [details]
src/Synth/OscilGen.s: OscilGen::prepare() / 3.4.2

-O0 -Wall -S

------- Comment #9 From Eric Shattow 2004-10-13 04:29:12 0000 -------
Created an attachment (id=41707) [details]
src/Synth/OscilGen.C: OscilGen::prepare()

source code portion from media-sound/zynaddsubfx

------- Comment #10 From Eric Shattow 2004-10-13 04:34:09 0000 -------
relevent part that seems to be dying from bad gcc 3.4.x generation is line
32-33 of the ::prepare function in OscilGen.C, no matter what you put after
those 'for' statements it is corrupted and dies inexplicably.

------- Comment #11 From Eric Shattow 2004-10-13 13:52:44 0000 -------
Created an attachment (id=41757) [details]
src/Synth/OscilGen.s: gcc 3.4.2

g++ -O0 -S    -c -o OscilGen.s OscilGen.C

------- Comment #12 From Eric Shattow 2004-10-13 13:55:04 0000 -------
Created an attachment (id=41759) [details]
src/Synth/OscilGen.s: gcc 3.3.4

g++ -O0 -S    -c -o OscilGen.s OscilGen.C

------- Comment #13 From Eric Shattow 2004-10-13 14:02:04 0000 -------
Created an attachment (id=41763) [details]
src/Synth/OscilGen.C

when built with these flags...
  CXXFLAGS= -O0 -ggdb -Wall
...and the gcc 3.3.4-r1 compiler, the program operates normally.
when built with the same flags and the gcc 3.4.2-r1 compiler, the program loads
but crashes when trying to run the part of the code that generates the Additive
Synthesis.

The invalid code appears in the "OscilGen::prepare" function, at line 677 of
the OscilGen.C source code.

------- Comment #14 From Eric Shattow 2004-10-13 14:21:02 0000 -------
Created an attachment (id=41764) [details]
gdb output from zynaddsubfx crash

compiled w/ 3.4.2-r2,  ran zyn the first time and enabled only the SUBSynth =
no crash, then enabled the PADsynth = crash, ran zyn a second time and enabled
only the ADSynth = crash

------- Comment #15 From Eric Shattow 2004-10-13 14:29:16 0000 -------
Created an attachment (id=41766) [details]
diff -burN OscilGen-OscilGen_prepare.s-3.3.4 OscilGen-OscilGen_prepare.s-3.4.2

diff of assembler output pertaining to the relevent problematic compiler
output, in the OscilGen::prepare function.

------- Comment #16 From Eric Shattow 2004-10-13 18:33:46 0000 -------
gcc folks said it was not likely a gcc bug.   i'm not so sure about that, but
they suggested using valgrind and some other tricks to get a better idea. 
valgrind blew up, and refused to get farther than a "generic error" in libc. 
for now, i think i've found a workaround;  it is ugly, doesn't make any sense,
and if there is indeed some sort of problem with the Zyn code i would rather
get the source of the problem solved.

closing this bug as CANTFIX because i have nfc how to find the memory problem
in the code.   there's just too many "x-y-z" operator precedence assumptions
where i do not know what the author intended, or why this code ever worked when
compiled with gcc 3.4.2 anyways.

------- Comment #17 From Eric Shattow 2004-10-13 19:59:23 0000 -------
according to the gcc guys on IRC, this is not a problem with gcc / glibc /
kernel and parts of the official specifications not being real clear on how to
do memory alignement for operator :: new.

------- Comment #18 From Eric Shattow 2004-10-13 20:08:35 0000 -------
Created an attachment (id=41778) [details]
IRC session, #gcc on OFTC

conversation, detailing how this is some kind of gcc/glibc related bug,
possibly an alignement issue.

------- Comment #19 From Eric Shattow 2004-10-13 20:13:45 0000 -------
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15795

------- Comment #20 From Eric Shattow 2004-10-16 14:44:41 0000 -------
this is a gcc bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17990). 
closing.

First Last Prev Next    No search results available      Search page      Enter new bug