Opened 13 years ago

Closed 13 years ago

#4024 closed defect (duplicate)

jp2kakDataset misbehaves in the destructor if kdu_num_processors() returns 1

Reported by: goofwithz3 Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.7.2
Severity: normal Keywords:
Cc:

Description

In Gdal v 1.7.2, in jp2kakdataset.cpp, line 1437, kdu_get_num_processors returns 0. this means we are running single threaded (which is correct in my case). as a result poDS->poThreadEnv never gets created at line 1443.

then in JP2KAKDataset::~JP2KAKdataset(), there is a check to see if poThreadEnv is NULL. if it is non-null, then terminate is called.

However, poThreadEnv is never initialized to NULL in the constructor. So sometimes, poThreadEnv takes on invalid values.

The fix is to set poThreadEnv to NULL in the constructor.

Change History (1)

comment:1 by Even Rouault, 13 years ago

Resolution: duplicate
Status: newclosed

Has been fixed by #3852

Note: See TracTickets for help on using tickets.