- disabled jump tables for x86_64, because they cause various kinds of

crashes with dynamic libraries (mantis #13628 and related bugs)

git-svn-id: trunk@13073 -
This commit is contained in:
Jonas Maebe 2009-05-01 14:54:38 +00:00
parent 5db78d185f
commit dd55947b4b
4 changed files with 46 additions and 1 deletions

2
.gitattributes vendored
View File

@ -8840,6 +8840,8 @@ tests/webtbs/tw13583.pp svneol=native#text/plain
tests/webtbs/tw13596.pp svneol=native#text/plain
tests/webtbs/tw13596a.pp svneol=native#text/plain
tests/webtbs/tw13622.pp svneol=native#text/plain
tests/webtbs/tw13628a.pp svneol=native#text/plain
tests/webtbs/tw13628b.pp svneol=native#text/plain
tests/webtbs/tw1364.pp svneol=native#text/plain
tests/webtbs/tw1365.pp svneol=native#text/plain
tests/webtbs/tw1374.pp svneol=native#text/plain

View File

@ -73,7 +73,11 @@ implementation
function tx86casenode.has_jumptable : boolean;
begin
has_jumptable:=target_info.system<>system_x86_64_darwin;
{$ifdef i386}
has_jumptable:=true;
{$else}
has_jumptable:=false;
{$endif}
end;

10
tests/webtbs/tw13628a.pp Normal file
View File

@ -0,0 +1,10 @@
{ %norun }
library tw13628a;
uses
SysUtils;
begin
end.

29
tests/webtbs/tw13628b.pp Normal file
View File

@ -0,0 +1,29 @@
{ %needlibrary }
program loadmodule;
uses
dynlibs;
const
{$ifdef unix}
{$ifdef darwin}
libname = './libtw13628a.dylib';
{$else darwin}
libname = './libtw13628a.so';
{$endif darwin}
{$endif unix}
{$ifdef windows}
libname = 'tw13628a.dll';
{$endif windows}
var
hdl: TLibHandle;
begin
hdl := loadlibrary(libname);
if (hdl=nilhandle) then
halt(1);
if not UnloadLibrary(hdl) then
halt(2);;
end.