Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1376 closed defect (fixed)

DIG: overlapping memory in memcpy() call

Reported by: SF/khalek Owned by: aquadran
Priority: normal Component: Engine: SCUMM
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 Changed 15 years ago by fingolfin

Well, aquadran just moved all the IMuseDigital stuff around.

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

comment:2 Changed 15 years ago by fingolfin

Owner: set to aquadran

comment:3 Changed 15 years ago by aquadran

Resolution: wontfix
Status: newclosed

comment:4 Changed 15 years ago by aquadran

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

comment:5 Changed 15 years ago by fingolfin

Resolution: wontfix
Status: closednew

comment:6 Changed 15 years ago by fingolfin

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 Changed 15 years ago by SF/khalek

can't seem to reproduce with latest CVS, closing

comment:8 Changed 15 years ago by SF/khalek

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