asl / llvm-bugzilla

0 stars 0 forks source link

Missed warning opportunity/sanitizef failure (Bugzilla Bug 4) #4

Open asl opened 5 years ago

asl commented 5 years ago

This issue was created automatically with bugzilla2github

Bugzilla Bug 4

Date: 2019-10-26T15:41:24+07:00 From: @DenisYaroshevskiy To: Unassigned Clang Bugs <unassignedclangbugs@nondot.org> CC: blitzrakete@gmail.com, @DougGregor, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, @zygoloid

Last updated: 2019-10-26T15:41:24+07:00

asl commented 5 years ago

Comment 190256

Date: 2019-10-26 15:41:24 -0700 From: @DenisYaroshevskiy

This bug has been in my code and passed everything, -Werror -Wall and running with asan.

https://gcc.godbolt.org/z/CSC4ra

Misplacing two parameters in a vector constructor is very common.

On Mac asan doesn't catch this (on linux it does - this is how this bug was found, but a couple of month later)

I wondered if this is possible to warn on, given that it's very similar to signed/unsigned casts.

Clang version: Apple clang version 11.0.0 (clang-1100.0.33.8)