Boost logo

Boost Users :

Subject: Re: [Boost-users] [proto, fusion] Segfault in for_each
From: David A. Greene (greened_at_[hidden])
Date: 2010-05-14 00:23:54


On Thursday 13 May 2010 23:16:31 David A. Greene wrote:
> On Monday 10 May 2010 21:15:42 Eric Niebler wrote:
> > > I've been wrestling with this for days. Any ideas on how to debug
> > > this?
> >
> > Nope. But it'd probably help if you sent around a self-contained repro.
>
> Ok, here's a smallish testcase. gdb shows the same problem: an invalid
> proto expression reference.

This test gives a little more information at runtime. It looks like
TranslateToSymbol is called by fusion::transform but is given garbage:

Building type list:
comma(
    comma(
        function(
            terminal(int_)
          , terminal(32)
        )
      , function(
            terminal(int_)
          , terminal(16)
        )
    )
  , function(
        terminal(int_)
      , terminal(64)
    )
)
3 members for list
Translating to symbol:
function(
    terminal(int_)
  , terminal(-1208424368)
)

Also, the test doesn't compile if I remove the const qualifier from the
Expr argument to the two TranslateListImpl classes' call operators.
I don't know why, but removing them causes a type mismatch. Maybe
that's a clue?

                                -Dave


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net