omitting BLISS_USE_GMP causes mysterious failures

Bug #1087771 reported by David Bremner
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bliss (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692449

[Impact]

In versions 0.72-2 and 0.72-3, if the user
neglects to define the preprocessor symbol BLISS_USE_GMP when
compiling their code, it will build successfuly but segfault at
runtime. This is fixed in -4. The fix in -3 is needed for this to
work transparently.

bliss is a leaf package in Wheezy, but I've already had bug reports
(on the bugtracker of an upstream project) for -3.
[Test case]
Install libbliss-dev 0.72-3 (or probably -2, untested)

compile the attached C++ file (from the bliss source package) like

% g++ -o crashme -I/usr/include/bliss bliss.cc -lbliss

run on any input, e.g.

c An example graph.
p edge 4 5
n 2 1
e 1 2
e 4 1
e 2 3
e 2 4
e 3 4

The result is a segmentation fault.

I'm not running Ubuntu, but I have confirmation from Ubuntu users on 12.04 and 12.10 that this failure occurs there.

[Fix]

The fix 0.72-4.

Here is the debdiff, less the changelog stanzas.

diff -u bliss-0.72/debian/Makefile.shlib bliss-0.72/debian/Makefile.shlib
--- bliss-0.72/debian/Makefile.shlib
+++ bliss-0.72/debian/Makefile.shlib
@@ -15,7 +15,7 @@
  $(CC) -fPIC -c $(CFLAGS) -o $@ $<

 libbliss.so: $(GMPSHOBJS)
- $(CC) -shared -Wl,-soname,$(SONAME) -o $(SOFULL) $^
+ $(CC) -shared -Wl,-soname,$(SONAME) $(LIB) -o $(SOFULL) $^
  ln -sf $(SOFULL) $(SONAME)
  ln -sf $(SOFULL) libbliss.so

only in patch2:
unchanged:
--- bliss-0.72.orig/defs.hh
+++ bliss-0.72/defs.hh
@@ -23,6 +23,8 @@
   along with Foobar. If not, see <http://www.gnu.org/licenses/>.
 */

+#undef BLISS_USE_GMP
+#define BLISS_USE_GMP

 namespace bliss {

[ Regression Impact]

It is remotely possible (although I don't see how in this case) that any change to installed headers could cause user code to FTBFS. As far as I can tell, this will actually be an improvement over compiling fine and then segfaulting.

Revision history for this message
David Bremner (bremner) wrote :
Revision history for this message
David Bremner (bremner) wrote :
Changed in bliss (Ubuntu):
status: New → Fix Released
Revision history for this message
David Bremner (bremner) wrote :
Revision history for this message
David Bremner (bremner) wrote :

For precise this also contains the change from 0.72-3 that cause the bliss shared library to be explicitly linked against GMP.
This change has been tested in 12.10. Of course I can produce a patch without it, if needed.

Revision history for this message
David Bremner (bremner) wrote :

-minimize changelog
-use version ${precise_version}ubuntu0.1

Revision history for this message
David Bremner (bremner) wrote :

- minimize changelog
-use version ${precise_version}ubuntu0.1

Revision history for this message
David Bremner (bremner) wrote :

- revise changelog (put back info from deleted debian stanzas)

Revision history for this message
David Bremner (bremner) wrote :

update changelog

Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks. I have uploaded your last iteration to quantal-proposed and precise-proposed.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted bliss into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/bliss/0.72-3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in bliss (Ubuntu Quantal):
status: New → Fix Committed
tags: added: verification-needed
Changed in bliss (Ubuntu Precise):
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello David, or anyone else affected,

Accepted bliss into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/bliss/0.72-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
David Bremner (bremner) wrote :

polymake developer Michael Joswig reports

   I can confirm that it works on Ubuntu 12.04. Thanks!

polymake developer Ben Mueller reports

 On quantal upgrading libbliss to 0.72-3ubuntu0.1 (and recompiling the
 extension) also solved the segfaults.

I can provide more details if needed, unfortunately the polymake bug tracker (where those messages come from) is not public at the moment.

David Bremner (bremner)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bliss - 0.72-2ubuntu0.1

---------------
bliss (0.72-2ubuntu0.1) precise-proposed; urgency=low

  * Force BLISS_USE_GMP to be defined so that user compiled code matches
    the library (LP: #1087771).
  * Link libbliss.so.1d.0 against gmp (Closes: #685390), make above fix
    transparent to user.
 -- David Bremner <email address hidden> Sat, 08 Dec 2012 10:08:55 +0100

Changed in bliss (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bliss - 0.72-3ubuntu0.1

---------------
bliss (0.72-3ubuntu0.1) quantal-proposed; urgency=low

  * Force BLISS_USE_GMP to be defined so that user compiled code matches
    the library (LP: #1087771).
 -- David Bremner <email address hidden> Sat, 08 Dec 2012 10:06:45 +0100

Changed in bliss (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.