Bug 714686

Summary: libunwind-setjmp missing
Product: [Fedora] Fedora Reporter: Marcin Rzeźnicki <marcin.rzeznicki>
Component: libunwindAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: jan.kratochvil
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-24 10:06:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marcin Rzeźnicki 2011-06-20 12:50:40 UTC
Shouldn't libunwind package contain libunwind-setjmp lib? I can see that it is officially part of the library (see docs), furthermore, OpenSUSE's linunwind package installs this. Thanks in advance

Comment 1 Jan Kratochvil 2011-06-24 10:06:40 UTC
It is removed as on Fedora package depends on it and it is broken in libunwind as it conflicts with glibc.

http://pkgs.fedoraproject.org/gitweb/?p=libunwind.git;a=blob_plain;f=libunwind-disable-setjmp.patch;hb=master
* Wed Jul 15 2009 Jan Kratochvil <jan.kratochvil> - 0.99-0.11.20090430betagit4b8404d1
- Disable the libunwind-setjmp library as no longer compatible with glibc and
  no Fedora dependencies on it (FTBSFS BZ 511562).

If you have a neede for libunwind-setjmp please reopen this Bug and I will fix the upstream libunwind problem of its incompatibility with glibc (or check if SuSE has some downstream patch for it or so).

Thanks.

Comment 2 Marcin Rzeźnicki 2011-06-25 13:33:58 UTC
Thanks for info. Honestly, I do not see how it can conflict with glibc. libunwind-setjmp is meant to provide replacement for corresponding glibc's functions. The implementation seems to be pretty straightforward: setjmp 
  38 int
  39 setjmp (env)
  40      jmp_buf env;
  41 {
  42   void **wp = (void **) env;
  43 
  44   /* this should work on most platforms, but may not be
  45      performance-optimal; check the code! */
  46   wp[JB_SP] = __builtin_frame_address (0);
  47   wp[JB_RP] = (void *) __builtin_return_address (0);
  48   return 0;
  49 }
uses simple gcc's builtins. longjmp is little longer but internally it calls libunwind functions like unw_set_reg, unw_step and unw_resume (which presumably work if we assume that libunwind works). I am unsure whether reasons for rejecting this part of libunwind are still valid. Please investigate. Thank you for your time.

Comment 3 Jan Kratochvil 2011-06-25 14:24:32 UTC
(In reply to comment #2)
> Thanks for info. Honestly, I do not see how it can conflict with glibc.

https://koji.fedoraproject.org/koji/getfile?taskID=3160598&name=build.log
/usr/include/bits/setjmp2.h:26:13: error: 'longjmp' aliased to undefined symbol '_longjmp'


> libunwind-setjmp is meant to provide replacement for corresponding glibc's
> functions.

And what is it good for?  AFAIK it only has a bit better performance then.


> I am unsure whether reasons for rejecting this part of libunwind are still
> valid.

The error above on the build right now seems very valid.


> Please investigate.

Sure I could fix it but so far I do not see any user for libunwind-setjmp.
Life is too short to fix any bug one can find. :-)

Comment 4 Marcin Rzeźnicki 2011-06-26 21:46:56 UTC
(In reply to comment #3)
> 
> Sure I could fix it but so far I do not see any user for libunwind-setjmp.
> Life is too short to fix any bug one can find. :-)

All right then, guess you're right :-)