Opened 18 years ago

Closed 17 years ago

Last modified 11 years ago

#295 closed Bugs (Rejected)

Is there a Bug In boost::any

Reported by: palzhou Owned by: kevlin
Milestone: Component: None
Version: None Severity: Problem
Keywords: Cc:

Description

Is there a Bug In boost::any


Description:
In my DLLThere is a class as follows:
class MyClass
{
   ...
   boost::any m_var;
}

and DLL has an interface
void SetVar(boost::any & anyValue)
{
    pMyClass->m_var = anyValue;
}

There is an application uses the SetVar interface and 
pass into a boost::any object.
void SomeFunc()
{
   ...
   boost::any anyValue;
   ...
   pfSetVar(anyValue);
   ...
}


result:
when exit, The application will be crash , the spot of 
crash is at the destruction of class boost::any. 
...
class any
{
   ...
   ~any()
    {
        delete content;  // errorerror code 0xC0000005
    }
   ...
}
...

environment:
MS windows 2000  pro  sp4
MS vc6 sp5
boost 1.31

Change History (3)

comment:1 by kevlin, 17 years ago

Status: assignedclosed
Logged In: YES 
user_id=32864

This appears to be standard copy usage of an any, which is 
a well-trodden path and has had no other bugs reported 
against it. Likewise, inspection of the code does not reveal 
any hidden corner cases. I suspect that something else in 
the submitter's code led to memory trampling of some kind. 
So, in answer to the summary of the defect, no, I don't 
believe there is. However, if a self-contained example that 
demonstrates a problem can be posted, this conclusion can 
be revisited and the defect reopened.

comment:2 by anonymous, 11 years ago

Severity: Problem

evn i have faced this issue but i have hot got core dump instead i got memory leak

comment:3 by anonymous, 11 years ago

evn i have faced this issue but i have not got core dump instead i got memory leak

Note: See TracTickets for help on using tickets.