Thanks for checking this.

Just tested it and I’m getting an immediate segfault again, this time at:

```
autodiffstackstorage.hpp:125
125 instance_ = new AutodiffStackStorage();
```

originating in `init_chainablestack.hpp`

as before. This is the first case, so when `is_initialized`

is false, as in

```
if (!is_initialized) {
is_initialized = true;
instance_ = new AutodiffStackStorage();
return true;
}
```

If I set `STAN_MATH_REV_CORE_INIT_CHAINABLESTACK_HPP`

then I get it later, at the same point, when I try to instantiate the struct.

This is at least a different sort of problem, right? How can the assignment itself be causing a segfault?

My `nm`

output again:

```
000000000005aac0 W stan::math::AutodiffStackSingleton<stan::math::vari, stan::math::chainable_alloc>::AutodiffStackStorage::AutodiffStackStorage()
000000000005aac0 W stan::math::AutodiffStackSingleton<stan::math::vari, stan::math::chainable_alloc>::AutodiffStackStorage::AutodiffStackStorage()
0000000000000008 u stan::math::AutodiffStackSingleton<stan::math::vari, stan::math::chainable_alloc>::instance_
0000000000054930 W stan::math::AutodiffStackSingleton<stan::math::vari, stan::math::chainable_alloc>::~AutodiffStackSingleton()
0000000000054930 W stan::math::AutodiffStackSingleton<stan::math::vari, stan::math::chainable_alloc>::~AutodiffStackSingleton()
```

`u`

means: ‘“u” The symbol is a unique global symbol. This is a GNU extension to the standard set of ELF symbol bindings. For such a symbol the dynamic linker will make sure that in the entire process there is just one symbol with this name and type in use.’