Issues.00607 - lordmundi/wikidoctest GitHub Wiki
00607: EDGE seg faults on some linux systems
Summary: EDGE seg faults on some linux systems
Created: 2017–05–04 14:52
Status: Released
Category: Bug
From: frankie
Version: 2.4
Released_In: 2.4.1
Description:
on some systems, EDGE seg faults in RenderGeomData inside speedtest.
a stack trace looks like:
Program received signal SIGSEGV, Segmentation fault.
0x00007fffecfdc0da in RenderGeomData (pgdata=0x14f4e760) at
dsp_speedtest3.c:13563
13563 dsp_speedtest3.c: No such file or directory.
(gdb) where
#0 0x00007fffecfdc0da in RenderGeomData (pgdata=0x14f4e760) at
dsp_speedtest3.c:13563
#1 0x00007fffecfdc69b in InitializeAmboccTerms () at dsp_speedtest3.c:13751
#2 0x00007fffecff409d in InitializeGeomArrays () at dsp_speedtest3.c:13861
#3 0x00007fffed00d465 in DrawScene () at dsp_speedtest3.c:19335
#4 0x00007ffff7b23058 in DSF_DrawScene () at dsp_draw.c:3739
#5 0x00007fffee8ae690 in DrawScene () at dsp_drawcanvas.c:2471
#6 0x00007ffff7b23058 in DSF_DrawScene () at dsp_draw.c:3739
#7 0x00007fffed236561 in DSP_DrawTrails () at dsp_trail.c:239
#8 0x00007ffff7b23058 in DSF_DrawScene () at dsp_draw.c:3739
#9 0x00007fffec6156d0 in DrawScene () at dsp_planet2.c:10122
#10 0x00007ffff7b23058 in DSF_DrawScene () at dsp_draw.c:3739
#11 0x00007ffff7b263a7 in DSF_DrawView () at dsp_draw.c:5255
#12 0x00007fffecfdfbd3 in DrawView () at dsp_speedtest3.c:11871
#13 0x00007ffff7b246e8 in DSF_DrawView () at dsp_draw.c:4982
#14 0x00007fffee8ace70 in DrawView () at dsp_drawcanvas.c:2694
#15 0x00007ffff7b246e8 in DSF_DrawView () at dsp_draw.c:4982
...
Comments
Associated Commits
| commit | 03b17baaa3e660f13abda84004f46a6e105bda24
link5 |
||
| Author: | Alex Lin
|
| Date: | Thu May 11 09:31:38 2017 -0500
|
| Message: | [@Issue 00607: EDGE seg faults on some linux systems
Changed the hash to subscript calculations to use bit shifts and bit masking. This replaces using a pointer of differing types which violates the strict aliasing rule. The resulting calculation is equivalent to the previous value. @] |
Affected Files:
src/dsp/dsp_geom.c | 22 +++++++++±-----------
src/dsp/dsp_resource.c | 29 +++++++++±------------------
2 files changed, 20 insertions(+), 31 deletions(-)
| commit | d2eef57e619cbcae225260372acd93f4cf8aa91a
link6 |
||
| Author: | Alex Lin
|
| Date: | Tue May 9 17:19:36 2017 -0500
|
| Message: | [@Issue 00607: EDGE seg faults on some linux systems
Tracked this down to calculations of subscript from a hash values. When optimization is turned on the compiler on Scientific Linux 6 (gcc 4.4) the calculation changes and gives the wrong subscript. Added a volatile keyword in front of the subscript variable and the hash value used to calculate the subscript. This prevents optimizing these values and the calculation is now done correctly. @] |
Affected Files:
src/dsp/dsp_geom.c | 12 +++++±-----
src/dsp/dsp_resource.c | 10 ++++±----
2 files changed, 11 insertions(+), 11 deletions(-)
| commit | 1c33883b71b75dc97d3d8035016bcc944f045f43
link7 |
||
| Author: | Alex Lin
|
| Date: | Tue May 16 13:27:42 2017 -0500
|
| Message: | [@Issue 00607: EDGE seg faults on some linux systems
Changed the hash to subscript calculations to use bit shifts and bit masking. This replaces using a pointer of differing types which violates the strict aliasing rule. The resulting calculation is equivalent to the previous value. @] |
Affected Files:
src/dsp/dsp_geom.c | 22 +++++++++±-----------
src/dsp/dsp_resource.c | 29 +++++++++±------------------
2 files changed, 20 insertions(+), 31 deletions(-)
| commit | 40fc9152e0777d8aa025d83e0fc79d19c215c8da
link8 |
||
| Author: | Alex Lin
|
| Date: | Tue May 9 17:35:57 2017 -0500
|
| Message: | [@Issue 00607: EDGE seg faults on some linux systems
Tracked this down to calculations of subscript from a hash values. When optimization is turned on the compiler on Scientific Linux 6 (gcc 4.4) the calculation changes and gives the wrong subscript. Added a volatile keyword in front of the subscript variable and the hash value used to calculate the subscript. This prevents optimizing these values and the calculation is now done correctly. @] |
Affected Files:
src/dsp/dsp_geom.c | 12 +++++±-----
src/dsp/dsp_resource.c | 10 ++++±----
2 files changed, 11 insertions(+), 11 deletions(-)