Opened 10 years ago

Closed 9 years ago

#8283 closed Bugs (fixed)

list_new/list_push_back missing object_copy

Reported by: Kohei Takahashi <flast@…> Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

list_new() and list_push_back() are missing object_copy when insert a object. This causes memory access violation with BJAM_NO_MEM_CACHE.

Attachments (2)

fix-lame-object-copying.patch (608 bytes ) - added by Kohei Takahashi <flast@…> 10 years ago.
fix-missing-object_copy.patch (934 bytes ) - added by Kohei Takahashi <flast@…> 10 years ago.

Download all attachments as: .zip

Change History (9)

by Kohei Takahashi <flast@…>, 10 years ago

comment:1 by Steven Watanabe, 10 years ago

These functions are not supposed to make copies. They take ownership of their arguments. Your patch will result in a memory leak with BJAM_NO_MEM_CACHE. The correct fix is to track down the caller that isn't making a copy.

comment:2 by Kohei Takahashi <flast@…>, 10 years ago

Ah, I know. I will track down true problems and make patch again.

by Kohei Takahashi <flast@…>, 10 years ago

comment:3 by Kohei Takahashi <flast@…>, 10 years ago

How is above one?

comment:4 by Steven Watanabe, 10 years ago

(In [83630]) Add missing object_copy. Refs #8283.

comment:5 by Steven Watanabe, 10 years ago

I've committed the path.c fix. I'm not sure what the reason for the pathnt.c change is, though. AFAICT, path should be either overwritten on line 232 or copied on line 249.

comment:6 by anonymous, 10 years ago

Indeed, I'd had to do scrutiny. Sorry for the confusion.

comment:7 by Steven Watanabe, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.