From: Vladimir T. <vtz...@gm...> - 2017-05-23 09:57:32
|
I already tried disabling only SINGLEMAP_MEMORY_STACK and got immediate segfault (single threaded build as well) on startup in init_object_tab() . Didn't investigate much but seems STACK is bogus. It looks to me there are two ways to enable MT with SINGLEMAP_MEMORY: * disable SINGLEMAP_MEMORY_STACK and fix the above problem. * allocate new threads stacks in designated memory region instead of malloc-ing. In this way make_framepointer/topofframe/uTheFramepointer will behave as expected in the context of new threads. I tend towards the latter. On Tue, May 23, 2017 at 11:35 AM, Bruno Haible <br...@cl...> wrote: > Hi Vladimir, > > > I disabled SINGLEMAP_MEMORY model in MT builds. The problem is that this > > model assumes single fixed stack address range while every thread > requires > > it's own stack which is currently malloc-ed. What is the good way to > > workaround this? Allocate new threads stacks in the above range? > > You mean, the only problem with MT and SINGLEMAP_MEMORY was that in spvw.d > lines 3230..3245 we allocate one STACK range only, not multiple ones? > If yes, I would try to keep SINGLEMAP_MEMORY turned on and disable only > SINGLEMAP_MEMORY_STACK. > > Bruno > > |