Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] segfault of test on buildroot system
Date: Fri, 15 Mar 2013 11:03:03 +0100	[thread overview]
Message-ID: <20130315110303.507c9f8a@skate> (raw)
In-Reply-To: <5141FFBD.6050206@mail.ru>

Dear Alexander Varnin,

On Thu, 14 Mar 2013 20:50:05 +0400, Alexander Varnin wrote:

> I'm using buildroot based system with ARM samsung processor (s3c2443).
> I've found a case, when i get segfault in my application. Using x86 
> debian compilers doesn't reproduce error.
> Attaching test program to this letter. There is an exception getting 
> throw from constructor of child-class (DisplayPassDevice). At that time 
> parent destructor (~PassageDevice) getting called. When exiting from 
> parent destructor i got segfault.
> # ./throw
> ~PassageDevice
> Aborted (core dumped)
> 
> One more necessary condition. The bug appears only when i compile my 
> code with pthread:
> ../minipos-OS-build/host/usr/bin/arm-linux-g++ throw.cpp -o throw -lpthread
> 
> When i compile without -lpthread flag, program works OK.
> # ./throw
> ~PassageDevice
> catched
> 
> I don't know what does this problem belongs to, so i write there for 
> help. Probably you'll just point me, where to report it.
> Software i use is following: gcc 4.5.4, uClibc 0.9.33.2, linux 3.6.
> Just in case, i'll attach buildroot config

I personally don't have much clue for the moment, so the only
suggestion I can do is to rebuild your system with BR2_ENABLE_DEBUG,
and then use gdbserver + cross-gdb to figure out where the segmentation
fault happens (or getting a core file generated and use cross-gdb to
inspect it).

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-03-15 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 16:50 [Buildroot] segfault of test on buildroot system Alexander Varnin
2013-03-15 10:03 ` Thomas Petazzoni [this message]
2013-03-21 10:32   ` Alexander Varnin
2013-03-18  6:28 ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130315110303.507c9f8a@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox