Skip to content

Commit

Permalink
Remove incorrect address-of on instance pointer to delete
Browse files Browse the repository at this point in the history
This was causing a segfault, due to trying to delete the stack address
of the pointer itself.

Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Jul 25, 2023
1 parent fc556e0 commit 325a7b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/types/cptr/useChplClassInC/useChplClassInC.test.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main(int argc, char** argv) {
void* fooInstance; // class Foo in Chapel, but we only use a void* to it
getInstance(&fooInstance, 4);
printf("%i\n", useInstance(fooInstance));
deleteInstance(&fooInstance);
deleteInstance(fooInstance);

chpl_library_finalize();
}

0 comments on commit 325a7b8

Please sign in to comment.