Menu

#9 segv with abacus in AssemblerImp

critical_bug
open
compiler (4)
7
2014-08-16
2003-03-11
No

SegV runnung Abacus on solaris.

code:

virtual void onReloz(unsigned long rloc_addr)
{
// RegPC + relative = absolute
// => relative = absolute - RegPC (RegPC = rloc_addr)
unsigned long relative = absolute - rloc_addr;
*reinterpret_cast<unsigned long*>(code + rloc_addr)
= relative;
}

debugger infos:

values:
absolute == 714
rloc_addr == 1251

backtrace:

#0 0xff0e2be8 in Relocator::onReloz (this=0xfea0b7f0,
rloc_addr=1251) at AssemblerImp.cpp:252
#1 0xff0e2bbc in Relocator::onReference (this=0x41298,
reference=@0x2ca24) at AssemblerImp.h:248
#2 0xff0b16c0 in ReferenceTable::forEach
(this=0x2a758, type=LabelCode, visitor=@0xfea0b7f0) at
AssemblerImp.cpp:692
#3 0xff0b12d4 in AssemblerImp::finalizeObjectFile
(this=0x2a758) at AssemblerImp.cpp:531
#4 0xff0b0038 in Assembler::finalizeObjectFile
(this=0x29ac0) at Assembler.cpp:199
#5 0xff22eb88 in Parser::parse (this=0xfea0b9a8) at
Parser.cpp:597
#6 0xff228e10 in CoolCompiler::compile (this=0x264d8,
pScene=0x28878) at CoolCompiler.cpp:69
#7 0xff1b7570 in ParseThread::run (this=0xffbef138) at
ParseThread.cpp:92
#8 0xfef2115c in ocore::ThreadImpPosix::TFunc
(thread=0x264c0) at ../../ThreadImp.h:57

Discussion


Log in to post a comment.