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 08:32:29 -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> <CAP4yCj-YURKVhN-+pJ_ncKvB1EQtTMq3h6LNXn7X0LW16TW5Ag at mail dot gmail dot com> <559FD77B dot 3040208 at gmail dot com>
Thank you both for your time. Actually yes, I was using the wxWidget
precompiled libraries from ubuntu repositories, and it appears that some
macro from that library is responsible. I will just drop that library and
stick to a simple glfw window instead. wxWidgets is a pain anyway.
@johnsfine: yes I meant val&. Still have no idea how wxwidget affects how
functions are inlined though...
On Fri, Jul 10, 2015 at 4:32 PM, Ãngel GonzÃlez [via gcc] <
ml-node+s1065356n1167405h79@n5.nabble.com> wrote:
> On 10/07/15 13:21, achkan wrote:
> > 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.
>
> Are you using an already-built library file?
> A mismatch between the library object and the headers you use could cause
> what you are seeing. I would try recompiling the library.
>
>
>
> ------------------------------
> 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-tp1167297p1167405.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-tp1167297p1167427.html
Sent from the gcc - Help mailing list archive at Nabble.com.