Closed boxerab closed 4 years ago
Are you able to run the examples with enkiTS, and do you get the same results from valgrind? If not, this may be an usage issue so if I could take a look at the codec code I might be able to help.
I can replicate a segfault 11 on OSX 10.11.6 (El Capitan), which is the latest I can access for OSX as I don't have a new enough machine for 10.13 (High Sierra). I'm looking into this now but it might take a few days, particularly as my OSX machine is not very stable at the moment.
So it looks like OSX have deprecated mach semaphores, as they worked under previous versions but now I've updated OSX to a more recent version they don't.
I'll try switching to OSX dispatch semaphores, if this doesn't work I may need to switch to named BSD semaphores and use a unique name approach.
Thanks! C++20 finally provides a semaphore, BTW 😊
Side note: this would have been caught by CI builds. If you're interested, I can look into setting up Travis and Appveyor CI for the project
I'm already using Travis Cl for OSX, and this wasn't caught by my Cl builds since it's a runtime error rather than a build one. I need to create a simple test which can be run on the build server, and add that to the matrix.
Great to have CI, yes, I guess next step would be a few unit tests.
btw, for my testing, I installed OSX High Sierra VM on Ubuntu host using qemu:
https://github.com/kholia/OSX-KVM
Took about an hour to get this working.
I might be able to do this by running a VM on my Mac, as I believe this is permitted by the OSX license. However my Mac's not very powerful nor very stable so this may not be a great experience, but it could suffice.
The new implementation uses dispatch semaphores, which appears to be the approach used by other open source utilities such as boost.
This requires OSX 10.6+ or iOS 4+ so if any developers need support prior to that I might reinstate mach semaphores but would need someone to test as I don't have earlier versions to check the macro tests work.
At some point I'll add a simple unit test which should catch OSX changes to API behaviour.
Thanks!! Works like a charm.
Hi Doug, I ran my image codec, grok, which uses enkiTS, on OSX with valgrind, and I see this error:
This is for an earlier version of enkiTS, as the latest version will result in BAD_ACCESS error and my program crashes.
Have you run any valgrind tests on OSX ? Everything looks good on Linux.
Thanks.