Malloc errors with vector<double>

Hello all,

See if you can figure this one out. I’m using root 5.20 on OS 10.5.5. I’ve tried this with both the binaries and compiling myself. So when I try to push_back an element into a std::vector, root complains:

root [0] vector<double> v 
root [1] v.push_back(1.1)
Error: Can't call vector<double,allocator<double> >::push_back(1.1) in current scope (tmpfile):1:
Possible candidates are...
*** Interpreter error recovered ***
(in vector<double,allocator<double> >)
/Network/Servers/argus.Princeton.EDU/Volumes/Users/bloer/myroot/root/lib/libvectorDict.so  -1:-1   0 public: void vector<double,allocator<double> >::push_back(const double& x);
root [2] .q
root.exe(2460) malloc: *** error for object 0xc0000003: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug

However, if I FIRST create a vector everything’s ok!

root [0] vector<float> v1
root [1] vector<double> v2
root [2] v2.push_back(1.1)
root [3] v2[0]
(double)1.10000000000000009e+00
root [4] .q

It’s certainly not a crippling problem, sure is confusing. Should this be a bug report, or is my system just dumb?

Hi,

The problem is fixed in the SVN trunk.

Thanks for reporting this issue.

Cheers,
Philippe.