[meta-freescale] image-prelink (can) cause SIGSEGV on program startup (when run under GDB)

Cody Tudor cody.tudor at gmail.com
Fri Mar 25 15:30:42 PDT 2016


Hello Julio,

> The root cause of the SIGSEGV was a bad smart pointer in one application.
After fixed it, the segmentation is gone.

What was the end solution? Was it in your application or somewhere else?


>* On 19 March 2016 at 12:40, Julio Cruz Barroso <julio.cruz at smartmatic.com <https://lists.yoctoproject.org/listinfo/meta-freescale>> wrote:
*>* Hi Bjørn, Christian,
*> >* I'm trying to perform a remote debug with a Qt Application (as
you described below).
*> >* The GDB (at QT Creator) show a Segmentation Fault at dl-debug.c
[1]. Basically, the same situation.
*> >* I performed the following steps:
*> >* - Sync to the latest jethro revision
*>* - Delete tmp directory
*>* - Rebuild SD image
*>* - Rebuild SDK installer (bitbake my-image -c populate_sdk). 'my-image'
*>* inherit populate_sdk_qt5*


We have run into the same issue when remotely debugging our Qt app on a
Jethro device with Qt 5.5.1. Qt Creator receives SIGSEGV from the device
and breaks at line 51 in dl-debug.c because the pointer ‘r’ for structure
type _r_debug is not to a valid structure pointer (i.e. the device tries to
de-reference the pointer r which is invalid). All of this happens before
main() is ever reached.


I cannot for the life of me find where this breaks in our Jethro build. If
I roll back to Fido everything is peachy. Trying jethro-next branches where
appropriate did not help.


Any help you could provide would be greatly appreciated.


> However, another signal was received (and maybe others already received it) when trying to debug (GDB) something linked with openssl.


If you are debugging using Qt Creator your can add: 'handle SIGILL pass
nostop noprint' without the single quotes to the Additional Startup
Commands in the Tools->Options->Debugger->GDB. This will skip over the
SIGILL sent at start from libcrypto.so. It will also skip over any other
SIGILL received so it is quite a dirty solution.


Regards,


-Cody Tudor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20160325/2967677e/attachment.html>


More information about the meta-freescale mailing list