[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/18327] New: Exception frame merging is broken in gold
From: |
ian at airs dot com |
Subject: |
[Bug gold/18327] New: Exception frame merging is broken in gold |
Date: |
Fri, 24 Apr 2015 21:50:12 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18327
Bug ID: 18327
Summary: Exception frame merging is broken in gold
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: ian at airs dot com
CC: ian at airs dot com
Exception frame merging is broken on mainline. When two CIEs are merged, reloc
processing is not being applied to subsequent CIEs. This causes the
personality function to not be defined.
Compile these two C++ files without optimization and link them in order.
================================
void
bar()
{
}
================================
#include <iostream>
#include <cstdlib>
void
foo()
{
}
int
main()
{
try
{
throw(1);
}
catch(int)
{
std::cout << "caught" << std::endl;
exit(0);
}
std::cout << "failed" << std::endl;
exit(1);
}
===================================
The resulting program, when run, should print "caught". When I link it with
tip gold, I get
terminate called after throwing an instance of 'int'
Aborted
The reason is that the personality routine in the exception frame info is not
set. It should have been set by applying relocation processing to the CIE
data. Note that relocation processing is normally applied *after* EH frame
merging.
I suspect
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=dbe40a889191708b6e32441b1c64937844645574
but I don't know if that is actually the problem.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/18327] New: Exception frame merging is broken in gold,
ian at airs dot com <=
- [Bug gold/18327] Exception frame merging is broken in gold, ian at airs dot com, 2015/04/24
- [Bug gold/18327] Exception frame merging is broken in gold, ccoutant at gmail dot com, 2015/04/25
- [Bug gold/18327] Exception frame merging is broken in gold, rafael.espindola at gmail dot com, 2015/04/27
- [Bug gold/18327] Exception frame merging is broken in gold, rafael.espindola at gmail dot com, 2015/04/27
- [Bug gold/18327] Exception frame merging is broken in gold, rafael.espindola at gmail dot com, 2015/04/27
- [Bug gold/18327] Exception frame merging is broken in gold, rafael.espindola at gmail dot com, 2015/04/27