Re: Fix libexec/ld.so/dlclose regress

2017-08-03 Thread Ted Unangst
Joerg Sonnenberger wrote:
> On Wed, Aug 02, 2017 at 09:03:30PM +0200, Mark Kettenis wrote:
> > Couldn't convince clang not to inline duplicateFun() into bbTest2().
> > Splitting things out in a seperate file avoids the issue.  Fixes the
> > regression test.
> 
> Have you tried the combiniation of noinline attribute with
>   asm volatile("":::"memory")
> as non-movable side effect?

That's not representative of how libc is coded, though. If we rely on separate
translation units for the feature to work, that's how the test should work
too.



Re: Fix libexec/ld.so/dlclose regress

2017-08-03 Thread Joerg Sonnenberger
On Wed, Aug 02, 2017 at 09:03:30PM +0200, Mark Kettenis wrote:
> Couldn't convince clang not to inline duplicateFun() into bbTest2().
> Splitting things out in a seperate file avoids the issue.  Fixes the
> regression test.

Have you tried the combiniation of noinline attribute with
  asm volatile("":::"memory")
as non-movable side effect?

Joerg