Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#1376 closed defect (fixed)

DIG: overlapping memory in memcpy() call

Reported by: SF/khalek Owned by: aquadran
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: The Dig

Description

eriktorbjorn mentioned on irc the following valgrind warning that occurs with the dig just after the intro has been escaped, I subsequently confirmed it and here it is...

==20575== Thread 2: ==20575== Source and destination overlap in memcpy(0x3CFE726C, 0x3CFE8C43, 7674)==20575== at 0x3C01F0DE: memcpy (mac_replace_strmem.c:113) ==20575== by 0x809FD5E: Scumm::IMuseDigital::bundleMusicHandler() (imuse_digi.cpp:1339) ==20575== by 0x809F5DA: Scumm::IMuseDigital::music_handler(void*) (imuse_digi.cpp:1189) ==20575== by 0x8199DB4: Timer::handler(int) (timer.cpp:99)

If these sections of memory are indeed supposed to be overlapping memmove() should be used, otherwise this needs to be fixed. Either way it needs attention.

Latest CVS, Linux et cetera

Ticket imported from: #871656. Ticket imported from: bugs/1376.

Change History (8)

comment:1 by fingolfin, 21 years ago

Well, aquadran just moved all the IMuseDigital stuff around.

Can you check if the problem still is there with latest CVS?

comment:2 by fingolfin, 21 years ago

Owner: set to aquadran

comment:3 by aquadran, 21 years ago

Resolution: wontfix
Status: newclosed

comment:4 by aquadran, 21 years ago

heh, code is rewriten, can't check :)

comment:5 by fingolfin, 21 years ago

Resolution: wontfix
Status: closednew

comment:6 by fingolfin, 21 years ago

That's why I asked whether erik or khalek could please run Valgrind over the new code again, to verify that the problem is indeed gone.

comment:7 by SF/khalek, 21 years ago

can't seem to reproduce with latest CVS, closing

comment:8 by SF/khalek, 21 years ago

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