Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-08-25 05:04:00


>
> The regex library contains an alignment bug that leads to bus errors on 64
bit platforms (in particular, Sun and HP). To reproduce, compile regular
expression '(?>a+b|a+)bc+' with flags regex_constants::normal. This should
raise SIGBUS in perl_matcher<>::push_alt().

That's a known issue, and was fixed in cvs a while ago, with almost the same
fix that you used:

struct saved_state
{
union{
unsigned int id;
// these ensure that this struct gets the same alignment as derived structs:
void* padding1;
std::size_t padding2;
std::ptrdiff_t padding3;
};
saved_state(unsigned i) : id(i) {}
};

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk