Project

General

Profile

Actions

Bug #1252

closed

Face::operator= does not work

Added by Junxiao Shi about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Steps to reproduce:

  1. construct face1 and face2
  2. call face1->operator=(face2)
  3. destruct face2
  4. invoke face2->setInterestFilter

Expected: no error

Actual: segfault


Files

face-copy.cpp (555 Bytes) face-copy.cpp code to reproduce Junxiao Shi, 02/15/2014 01:21 PM
Actions #1

Updated by Junxiao Shi about 10 years ago

Face::operator= should be disabled to resolve this bug.

Actions #2

Updated by Junxiao Shi about 10 years ago

CORRECTION

Steps to reproduce:

  1. construct face1 and face2
  2. call face1->operator=(face2)
  3. destruct face2
  4. invoke face1->setInterestFilter
Actions #3

Updated by Alex Afanasyev about 10 years ago

Face must be nocopyable. There is no valid reason (and no clear logic how) face can be safely copied.

Actions #4

Updated by Junxiao Shi about 10 years ago

Face class should derive from boost::noncopyable, so that copy constructor and operator= are disabled.

Actions #5

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to Code review
  • Assignee set to Alex Afanasyev
  • % Done changed from 0 to 100
Actions #6

Updated by Alex Afanasyev about 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF