forkInitializeDisabled.m 506 B

123456789101112131415161718192021
  1. /*
  2. TEST_CONFIG OS=macosx MEM=mrc ARCH=x86_64
  3. (confused by ARC which loads Foundation which provokes more +initialize logs)
  4. (also confused by i386 OS_object +load workaround)
  5. TEST_ENV OBJC_PRINT_INITIALIZE_METHODS=YES
  6. TEST_RUN_OUTPUT
  7. objc\[\d+\]: INITIALIZE: disabling \+initialize fork safety enforcement because the app has a __DATA,__objc_fork_ok section
  8. OK: forkInitializeDisabled\.m
  9. END
  10. */
  11. #include "test.h"
  12. asm(".section __DATA, __objc_fork_ok\n.long 0\n");
  13. int main()
  14. {
  15. succeed(__FILE__);
  16. }