mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 12:39:09 +02:00
Fix possible access violation introduces in r21885
r21885 added a new peephole optimizer. The associated code refactoring missed a check for tai(hp1).typ = tai_instruction Which can lead to an access violation later on, because the rest of the code expects to find a taicpu in hp1. git-svn-id: trunk@21949 -
This commit is contained in:
parent
bdc62289b4
commit
be6bf6e3f7
@ -511,7 +511,8 @@ Implementation
|
|||||||
....
|
....
|
||||||
}
|
}
|
||||||
if (taicpu(p).ops = 2) and
|
if (taicpu(p).ops = 2) and
|
||||||
GetNextInstruction(p,hp1) then
|
GetNextInstruction(p,hp1) and
|
||||||
|
(tai(hp1).typ = ait_instruction) then
|
||||||
begin
|
begin
|
||||||
{
|
{
|
||||||
This changes the very common
|
This changes the very common
|
||||||
|
Loading…
Reference in New Issue
Block a user