Can't map modules to indices with shared libraries #114

Merged
merged 1 commit into from Jan 4, 2012

Projects

None yet

2 participants

@MartinNowak
Member
  • Module may be imported from a shared library and can't
    be assigned a fixed index any longer.
  • Flag modules after having them initialized, leave
    them flags until destruction.
  • Use a simplified stack based DFO traversal to
    avoid deep recursion and limit alloca to 100KB.
  • Reduce complexity, each module must only be
    visited once.
@MartinNowak MartinNowak Can't map modules to indices with shared libraries
 - Module may be imported from a shared library and can't
   be assigned a simple index any longer.

 - Flag modules after having them initialized.

 - Use a simplified stack based DFO traversal to
   avoid deep recursion and limit alloca to 100KB.
e07f159
@complexmath complexmath merged commit 34925f2 into dlang:master Jan 4, 2012
@MartinNowak
Member

Mmh, this seems to cause a Bus Error on OSX32 and a segmentation fault on OSX64.
Could be an alignment issue when using alloca memory for a struct array.
I don't have access to an OSX system. Can someone help me out with further details,
a small backtrace would be most helpful.

@complexmath
Member

On Jan 4, 2012, at 5:52 PM, Martin Nowak wrote:

Mmh, this seems to cause a Bus Error on OSX32 and a segmentation fault on OSX64.
Could be an alignment issue when using alloca memory for a struct array.
I don't have access to an OSX system. Can someone help me out with further details,
a small backtrace would be most helpful.

Huh, I can't even build Phobos on OSX right now, though the auto-tester doesn't seem to have the same problems.

std/algorithm.d(1325): Error: cannot implicitly convert expression (source) of type TempTransition[] to shared(const(TempTransition[]))
std/algorithm.d(1325): Error: cannot implicitly convert expression (source) of type TempTransition[] to shared(const(TempTransition[]))
std/algorithm.d(1407): Error: template instance std.algorithm.move!(TempTransition[]) error instantiating
std/range.d(6095): instantiated from here: move!(TempTransition[])
std/algorithm.d(6703): instantiated from here: SortedRange!(TempTransition[],less)
std/datetime.d(29515): instantiated from here: sort!("a.timeT < b.timeT",cast(SwapStrategy)0,TempTransition[])
std/range.d(6095): Error: template instance std.algorithm.move!(TempTransition[]) error instantiating
std/algorithm.d(6703): instantiated from here: SortedRange!(TempTransition[],less)
std/datetime.d(29515): instantiated from here: sort!("a.timeT < b.timeT",cast(SwapStrategy)0,TempTransition[])
std/algorithm.d(6703): Error: template instance std.range.SortedRange!(TempTransition[],less) error instantiating
std/datetime.d(29515): instantiated from here: sort!("a.timeT < b.timeT",cast(SwapStrategy)0,TempTransition[])

I've about used up my free time for now, but I'll look into this later.

@MartinNowak
Member

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment