Re: segfault by functor
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_GCbmxpu+2eHaW4HUrq9E8V8W3MHk+y1U4=+-x-gA9wwg@mail.gmail.com> |
On Sun, Jan 22, 2017 at 1:54 AM, Jens Kallup <[email protected]> wrote: > What does this mean? > How to fix it? As with Jens' reply, yes, this is not really a Qi question, per se, although there are Qi things most likely involved. I'm not familiar with the internals of Spirit, whether X3 or Qi/Karma, but that said... Think about it. I had done this once, and realized I had a rule in a local scope. Although it built okay, it ran with segfault. Why? Because the reference or pointer that Qi was holding onto to build the expression tree was suddenly gone when the scope rolled back. It was easy to solve in my case in that any rules should be maintained in an appropriate scope. For instance, in my case it was a parser/grammar class, so the rules were private members. > > Program received signal SIGSEGV, Segmentation fault. > 0x0000000000436a67 in operator() (a3=..., a2=..., a1=..., a0=..., > this=<optimized out>) > at /usr/local/include/boost/function/function_template.hpp:771 > 771 (this->functor BOOST_FUNCTION_COMMA > BOOST_FUNCTION_ARGS); > (gdb) q > A debugging session is active. > > Inferior 1 [process 22406] will be killed. > > Quit anyway? (y or n) y > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Spirit-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/spirit-general ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot