Don't cache the value of _NSGetEnviron on macOS#290
Conversation
This causes an issue with xcrun because its purpose is to set SDKROOT, which causes environ to change internally and when it calls execv (which we interpose) we continue to use the old value we copied at launch time rather than the new value. This is how environ has been defined internally for just about the last decade so hopefully this shouldn't be too poor of a workaround. Also, fix a couple of typos that I happened upon.
|
Hey @saagarjha , thanks for doing this. I wish I would have some understanding what OSX is doing with the environment in the processes. (I've learnt that it's not available as Do you know if it's okay to call |
|
The best I have is the man page for which essentially seem to say that |
|
Would be nice if we could get a release for this. |
|
v2.4.4 is the release which has this. |
This should fix #215, hopefully. I've tested this using
bear --libearwith the new libear.dylib (which was quite convenient, but I'm unsure if that was something I was supposed to use) on a couple of projects and it seems to work OK for most cases, whereas it didn't work at all before. I did run into one issue when trying to pass address sanitizer flags to ld but I'm unsure if that's a problem with Bear or this particular project's Makefile, so I'll try to double check that tomorrow.