New issue
Advanced search Search tips

Issue 757114 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

Clang doesn't fail on pure-virtual calls

Project Member Reported by brucedaw...@chromium.org, Aug 19 2017

Issue description

 Bug 757113  was a failure on VC++ builds of net_unittests caused by an order-of-destruction mistake. VC++ 2015 and VC++ 2017 reliably found this bug because the v-table for QuicClock contains three pure-virtual pointers, and the sock_ object called one of those pure-virtual functions.

This error was not found by clang.

Clang should make use of this rather awesome debugging tool. In fact, clang should go further than VC++. This bug was only caught in VC++ because the QuicClock base class contained pure virtual functions. Ideally when an object is destroyed the v-table ptr should be pointed at an array which contains nothing but pure-virt functions. This would allow additional order-of-destruction bugs to be found and would make clang superior to VC++ in this area.

 

Comment 1 by thakis@chromium.org, Aug 19 2017

Blocking: 82385

Sign in to add a comment