mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 22:47:54 +02:00
* prevent double freeing temps containing int64-sized parameters
(mantis #19700) git-svn-id: trunk@18053 -
This commit is contained in:
parent
e7b85a6175
commit
da3fb5de0f
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11695,6 +11695,7 @@ tests/webtbs/tw1948.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1950.pp svneol=native#text/plain
|
||||
tests/webtbs/tw19548.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw1964.pp svneol=native#text/plain
|
||||
tests/webtbs/tw19700.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1996.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2001.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2002.pp svneol=native#text/plain
|
||||
|
@ -1037,7 +1037,11 @@ implementation
|
||||
tmploc:=l;
|
||||
location_force_mem(list,tmploc);
|
||||
cg.a_load_loc_cgpara(list,tmploc,cgpara);
|
||||
location_freetemp(list,tmploc);
|
||||
{ do not free the tmploc in case the original value was
|
||||
already in memory, because the caller (ncgcal) will then
|
||||
free it again later }
|
||||
if not(l.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
|
||||
location_freetemp(list,tmploc);
|
||||
end
|
||||
else
|
||||
{$endif not cpu64bitalu}
|
||||
|
26
tests/webtbs/tw19700.pp
Normal file
26
tests/webtbs/tw19700.pp
Normal file
@ -0,0 +1,26 @@
|
||||
{ %target=darwin }
|
||||
{ %norun }
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch objectivec1}
|
||||
|
||||
program Main;
|
||||
uses
|
||||
CocoaAll;
|
||||
|
||||
type
|
||||
TSomeView = objcclass (NSView)
|
||||
function canvasPointFromEvent (theEvent: NSEvent): NSPoint; message 'canvasPointFromEvent:';
|
||||
end;
|
||||
|
||||
function TSomeView.canvasPointFromEvent (theEvent: NSEvent): NSPoint;
|
||||
begin
|
||||
result := convertPoint_fromView(theEvent.locationInWindow, nil);
|
||||
end;
|
||||
|
||||
var
|
||||
argc: LongInt;
|
||||
argv: PPChar;
|
||||
begin
|
||||
NSApplicationMain(argc, argv);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user