This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: segfault when functions are defined in headers or inlined
- From: achkan <ashsalehi4133 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 10 Jul 2015 04:21:10 -0700 (MST)
- Subject: Re: segfault when functions are defined in headers or inlined
- Authentication-results: sourceware.org; auth=none
- References: <1436521831306-1167297 dot post at n5 dot nabble dot com> <CAH6eHdTZY7Wh-TQDUNod50A-tJQecoxOMN=65jOjA91=JZjdWQ at mail dot gmail dot com> <1436526269636-1167315 dot post at n5 dot nabble dot com> <CAH6eHdTPf6NpN3-+CR1aR+HfCKugtr5PnJ81Mv1oAbWf-f7hKw at mail dot gmail dot com>
When is said every function I meant every function from the library (which
uses a lot of stuff... Torch7, wxWidget, opengl, eigen, opencv...). I
wouldn't know how to reproduce its behavior. But I'm sure that this problem
happens only when I include the wxWidget headers (the console versions do
not segfault.). Is it possible for a library to cause the problem I'm
talking about? I mean how can
leaky code, or any memory problems be avoided just by moving the definition
to the cpp?? But yeah you're right. I'll see if I can do that.
On Fri, Jul 10, 2015 at 1:10 PM, Jonathan Wakely-4 [via gcc] <
ml-node+s1065356n1167319h13@n5.nabble.com> wrote:
> On 10 July 2015 at 12:04, achkan wrote:
> > Thanks a lot for you answer. Yes, this happens with every inline
> function. If
> > I could write a simple, self-contained complete program that shows the
> > problem, I would gladly do it (I think this would take me more than a
> > year...).
>
> That's ridiculous. If it happens with *every* function then you could
> write a single file with one inline function and call it from main(),
> if that fails you've reproduced the problem (in a lot less than a
> year!) and if it doesn't fail then it proves it doesn't happen for
> *every* function and there must be something particular to your
> library. Maybe http://stackoverflow.com/help/mcve will help.
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://gcc.1065356.n5.nabble.com/segfault-when-functions-are-defined-in-headers-or-inlined-tp1167297p1167319.html
> To unsubscribe from segfault when functions are defined in headers or
> inlined, click here
> <http://gcc.1065356.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1167297&code=YXNoc2FsZWhpNDEzM0BnbWFpbC5jb218MTE2NzI5N3wtMTcwMzA2MTky>
> .
> NAML
> <http://gcc.1065356.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://gcc.1065356.n5.nabble.com/segfault-when-functions-are-defined-in-headers-or-inlined-tp1167297p1167320.html
Sent from the gcc - Help mailing list archive at Nabble.com.