Page MenuHomePhabricator

[asan] Handle 0 alignment in PosixMemalignFromLocalPool
AbandonedPublic

Authored by waltl on Jun 7 2018, 3:46 PM.

Details

Summary

The previous CHECK was wrong because alignment can be 0.

Diff Detail

Event Timeline

waltl created this revision.Jun 7 2018, 3:46 PM
alekseyshl added inline comments.Jun 7 2018, 4:51 PM
compiler-rt/lib/asan/asan_malloc_linux.cc
54

Actually, 0 alignment should have been rejected by CheckPosixMemalignAlignment. I'll add the check there.

Are you aware of the legal use case of 0 alignment?

waltl abandoned this revision.Jun 7 2018, 5:12 PM
waltl added inline comments.
compiler-rt/lib/asan/asan_malloc_linux.cc
54

My bad. I misread the spec.