Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCD tests are broken on Mac OS 10.6 #35

Closed
ramosian-glider opened this issue Aug 31, 2015 · 4 comments
Closed

GCD tests are broken on Mac OS 10.6 #35

ramosian-glider opened this issue Aug 31, 2015 · 4 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 35

asanbot has started reporting failures in GCD tests on Mac OS 10.6 today:
[  FAILED  ] AddressSanitizerMac.GCDDispatchAsync
[  FAILED  ] AddressSanitizerMac.GCDDispatchSync
[  FAILED  ] AddressSanitizerMac.GCDReuseWqthreadsAsync
[  FAILED  ] AddressSanitizerMac.GCDReuseWqthreadsSync
[  FAILED  ] AddressSanitizerMac.GCDDispatchAfter
[  FAILED  ] AddressSanitizerMac.GCDSourceEvent
[  FAILED  ] AddressSanitizerMac.GCDSourceCancel
[  FAILED  ] AddressSanitizerMac.GCDGroupAsync

This may be caused by issue 33 or by something else.

Reported by ramosian.glider on 2012-01-30 14:46:19

@ramosian-glider
Copy link
Member Author

I can see that a very simple ObjC test does not work with O2 (on Linux).

% cat foo.mm 
#include <stdlib.h>
int main(int argc, char **argv) {
  int *a = (int*)malloc(10 * sizeof(int));
  int res = a[argc + 10];
  free(a);
  return res;
}
% clang -O1 -ObjC  foo.mm -faddress-sanitizer  && ./a.out 2>&1 | grep ERROR
==11562== ERROR: AddressSanitizer heap-buffer-overflow on address 0x7f91d5144fac at
pc 0x401e90 bp 0x7fffccf6c0b0 sp 0x7fffccf6c0a8
% clang -O2 -ObjC  foo.mm -faddress-sanitizer  && ./a.out 2>&1 | grep ERROR
% 

Reported by konstantin.s.serebryany on 2012-01-30 23:06:14

@ramosian-glider
Copy link
Member Author

And most of the asan GCD tests pass if built with -O1. 
I guess the optimizer is being too smart. 

Reported by konstantin.s.serebryany on 2012-01-30 23:12:55

@ramosian-glider
Copy link
Member Author

r149296 fixes the problem by not letting the optimizer to optimize away the test code.

Reported by konstantin.s.serebryany on 2012-01-30 23:29:40

  • Status changed: Fixed

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:12:58

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant