On OS X, interceptors don't work in unit tests, so calloc() calls the system allocator. We need to use user_calloc() instead.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Can we use __interceptor_calloc instead like in other tests? Behavior in such case will be closer to user programs as the interceptor can also contain some logic.
Comment Actions
Sure, I'll update the patch. (I thought user_calloc is more consistent with the rest of this file, which uses user_alloc and user_free.)
Comment Actions
Sure, I'll update the patch. (I thought user_calloc is more consistent with the rest of this file, which uses user_alloc and user_free.)
Then, you can submit it as is.
The story behind these tests is somewhat moot. We used them when output tests did not exist. Ideally, they are rewritten to output tests. For output tests the idea is clear: write what user will write, test what matters for user.