-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Overrides cause double free
samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$ cat test1.pas
program test1;
virtual procedure zork; begin end;
begin
end.
samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$ cat test.pas
program test;
uses test1;
override procedure zork; forward;
override procedure zork; begin end;
begin
end.samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$ pcom test.pas test.p6
P6 Pascal compiler vs. 0.4.x
Pascal-P6 complies with the requirements of Pascaline version 0.4
and the following annexes: A,B,C,E.
free(): double free detected in tcache 2
Aborted (core dumped)
samiam@samiam-h-pc-2:~/projects/pascal/pascal-p6$
Diagnostics has shown that the root cause is the group list for the override entry is getting double freed. Another factor (and probably also a bug) is that the forward causes a new entry to be created for zork instead of combining them.
Metadata
Metadata
Assignees
Labels
No labels