[SERVER-7457] Windows memory leak in v8 wrapper Created: 24/Oct/12  Updated: 15/Feb/13  Resolved: 02/Nov/12

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 2.3.0
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Eric Milkie Assignee: Tad Marshall
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-2407 Switch to v8 Closed
Operating System: Windows
Participants:

 Description   

In v8_db.cpp, the GETNS macro generates an automatic variable-length array variable, except on Windows where we just allocate memory on the heap and never free it:

#ifdef _WIN32
#define GETNS char * ns = new char[args[0]->ToString()->Utf8Length()];  args[0]->ToString()->WriteUtf8( ns );
#else
#define GETNS char ns[args[0]->ToString()->Utf8Length()];  args[0]->ToString()->WriteUtf8( ns );
#endif



 Comments   
Comment by Eric Milkie [ 02/Nov/12 ]

resolved by SERVER-7537

Generated at Thu Feb 08 03:14:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.