Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1359215 - Segfault when built with new gcc 6 optimizations
Summary: Segfault when built with new gcc 6 optimizations
Keywords:
Status: CLOSED ERRATA
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:
: 1359213 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-22 14:07 UTC by Guido Aulisi
Modified: 2016-08-08 20:28 UTC (History)
3 users (show)

Fixed In Version: lilypond-2.19.46-2.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-08 20:28:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to solve crash (1.35 KB, patch)
2016-07-22 14:08 UTC, Guido Aulisi
no flags Details | Diff
Patch to solve FTBFS with gcc 6 (1.66 KB, patch)
2016-07-22 14:09 UTC, Guido Aulisi
no flags Details | Diff

Description Guido Aulisi 2016-07-22 14:07:40 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:08:51 UTC
Created attachment 1182861 [details]
Patch to solve crash

Comment 2 Guido Aulisi 2016-07-22 14:09:22 UTC
Created attachment 1182862 [details]
Patch to solve FTBFS with gcc 6

Comment 3 Guido Aulisi 2016-07-22 14:15:53 UTC
*** Bug 1359213 has been marked as a duplicate of this bug. ***

Comment 4 Gwyn Ciesla 2016-07-22 14:54:12 UTC
The crash patch applies, but the FTBFS patch doesn't, as it looks like it was derived from code other than 2.19.45.  Can you double-check?

Comment 5 Guido Aulisi 2016-07-22 17:45:40 UTC
Sorry, the second patch is against lilypond current git master branch (commit 445bf3bb2fbd1f2), that problem is not present in version 2.19.45.
Please do not apply the second patch to version 2.19.45, maybe it will be useful for the next version.

Comment 6 Gwyn Ciesla 2016-07-22 18:09:53 UTC
I wondered if that might be the case.  Thanks, I'll get the first patch out ASAP.

Comment 7 Fedora Update System 2016-07-22 19:45:14 UTC
lilypond-2.19.45-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d34b2bff27

Comment 8 Guido Aulisi 2016-07-23 17:34:04 UTC
These 2 issues have been corrected upstream too, version 2.19.46 will contain the fixes.

Comment 9 Fedora Update System 2016-07-23 22:21:41 UTC
lilypond-2.19.45-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d34b2bff27

Comment 10 Gwyn Ciesla 2016-07-24 16:29:00 UTC
Excellent, thank you!

Comment 11 Fedora Update System 2016-07-27 20:34:15 UTC
lilypond-doc-2.19.46-1.fc24 lilypond-2.19.46-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7937127a2d

Comment 12 Geoffrey Marr 2016-07-28 05:40:30 UTC
Checks out OK for me!

Comment 13 Fedora Update System 2016-07-29 03:56:27 UTC
lilypond-2.19.46-2.fc24, lilypond-doc-2.19.46-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7937127a2d

Comment 14 Fedora Update System 2016-08-08 20:27:58 UTC
lilypond-2.19.46-2.fc24, lilypond-doc-2.19.46-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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