Project

General

Profile

Actions

Bug #14856

closed

Clang removes dead code....

Added by Willem Jan Withagen about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

log/Log.cc:193:5: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
*(int *)(0) = 0xdead;
^~~~~~~~~

Code is:
if (m_inject_segv)
*(int *)(0) = 0xdead;

So this code is definitely not going to trap when running on FreeBSD or Clang.

Code is also very unclear on why we would like to trap this way

Actions #1

Updated by Kefu Chai about 8 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Kefu Chai
  • Priority changed from Normal to Low
  • Source changed from other to Community (dev)
Actions #2

Updated by Nathan Cutler about 8 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF