[GiNaC-devel] Crash during startup

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Sun Jan 23 23:06:03 CET 2005


Dear Chris,

On Thu, 20 Jan 2005, Chris Dams wrote:
[...]
> Okay, I can reproduce it now. The placement news that occured in my last
> patch appears to solve something, but not everything. Another problem are
> the refences _num_25 and so on. When are these going to be initialized?
> By the linker, I suppose.

Hmmm, good question.

>                           At least that would explain the point at which I
> am seeing segfaults now.

Are you saying your patch still segfaults?

>                          But how is the linker supposed to know where
> memory is going to be allocated? Here's a patch that also throws the
> references out of the library.

Could you please explain what you're doing in plain English?  I'm sure
we'll all get some better understanding of the issues this way.

Anyways, you got me slabbing my forehead really hard with your way of
cheerfully writing
    (_num0_p = new numeric(0))->setflag(status_flags::dynallocated);
instead of the more convoluted
    _num0_p   = static_cast<const numeric*>(&((new numeric(0))->setflag(status_flags::dynallocated)));
This looks good.

Regards
    -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>




More information about the GiNaC-devel mailing list