Bug 1359213 - Segfault when built with new gcc 6 optimizations
Summary: Segfault when built with new gcc 6 optimizations
Keywords:
Status: CLOSED DUPLICATE of bug 1359215
Alias: None
Product: Fedora
Classification: Fedora
Component: lilypond
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-22 14:06 UTC by Guido Aulisi
Modified: 2016-07-22 14:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-22 14:15:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Guido Aulisi 2016-07-22 14:06:14 UTC
Description of problem:
lilypond segfaults on Fedora 24 and gcc 6 with some input files.

Version-Release number of selected component (if applicable):
lilypond-2.19.45-1.fc24.x86_64

How reproducible:
Render a particular complex score (not really clear what input triggers the crash)

Steps to Reproduce:
1. Run lilypond a_score_file.ly


Actual results:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055d912666faf in Grob::get_offset (this=this@entry=0x0, a=a@entry=X_AXIS) at grob.cc:400
400	  if (dim_cache_[a].offset_)


Expected results:
The score compiles and the pdf is generated

Additional info:
This is probably due to this recent gcc 6 new optimization:
Optimizations remove null pointer checks for this
The backtrace shows that the crash is in grob.cc:

#0  0x000055d912666faf in Grob::get_offset(Axis) const (this=this@entry=0x0, a=a@entry=X_AXIS) at grob.cc:400
#1  0x000055d9126670a8 in Grob::relative_coordinate(Grob const*, Axis) const (this=0x0, refp=0x55d914f179f0, a=X_AXIS) at grob.cc:341
#2  0x000055d9126670ce in Grob::relative_coordinate(Grob const*, Axis) const (this=0x55d914ee8600, refp=0x55d914f179f0, a=X_AXIS) at grob.cc:345
#3  0x000055d9126670ce in Grob::relative_coordinate(Grob const*, Axis) const (this=0x55d914936920, refp=0x55d914f179f0, a=X_AXIS) at grob.cc:345
#4  0x000055d9126670ce in Grob::relative_coordinate(Grob const*, Axis) const (this=0x55d9149371c0, refp=0x55d914f179f0, a=X_AXIS) at grob.cc:345
#5  0x000055d9126670ce in Grob::relative_coordinate(Grob const*, Axis) const (this=0x55d914936c40, refp=0x55d914f179f0, a=X_AXIS) at grob.cc:345
#6  0x000055d9126670ce in Grob::relative_coordinate(Grob const*, Axis) const (this=this@entry=0x55d914937360, refp=0x55d914f179f0, a=a@entry=X_AXIS)
    at grob.cc:345
#7  0x000055d9123bc194 in Slur_configuration::score_extra_encompass(Slur_score_state const&) (this=0x55d914de9fb0, state=...)
    at slur-configuration.cc:341
#8  0x000055d9123bcae5 in Slur_configuration::run_next_scorer(Slur_score_state const&) (this=0x55d914de9fb0, state=...) at slur-configuration.cc:522
#9  0x000055d9125088ab in Slur_score_state::get_best_curve() const (this=this@entry=0x7fffad986a00) at slur-scoring.cc:427
#10 0x000055d912508b0f in Slur::calc_control_points(scm_unused_struct*) (smob=<optimized out>) at slur-scoring.cc:363
#11 0x00007fcaaf894cf5 in scm_dapply () at /lib64/libguile.so.17

I made a patch that seems to solve this problem and a second one to solve a FTBFS problem with 'constexpr' needed for in-class initialization of static data member.

I'll attach them here

Comment 1 Guido Aulisi 2016-07-22 14:15:53 UTC
Sorry double posting, see 1359215

*** This bug has been marked as a duplicate of bug 1359215 ***


Note You need to log in before you can comment on or make changes to this bug.