Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GASMAN problem in BIPART_LEFT_BLOCKS / BIPART_RIGHT_BLOCKS #469

Closed
ChrisJefferson opened this issue Mar 26, 2018 · 3 comments
Closed

GASMAN problem in BIPART_LEFT_BLOCKS / BIPART_RIGHT_BLOCKS #469

ChrisJefferson opened this issue Mar 26, 2018 · 3 comments
Labels
bug Label for issues or PR which report or fix bugs duplicate Label for issues or PR that are duplicates of others

Comments

@ChrisJefferson
Copy link
Contributor

In BIPART_LEFT_BLOCKS and RIGHT_BLOCKS, t bipart.cc:616 on my machine, here is a line which looks like:

ADDR_OBJ(x)[1] = blocks_new_obj(bipart_get_cpp(x)->left_blocks());

That's illegal, as the left hand side gets evaluated first, then the right hand side can cause GC.

Found using the new memory canary in ( gap-system/gap#2293 ), just for information.

@flsmith
Copy link
Collaborator

flsmith commented Mar 26, 2018

Funnily enough we addressed this last week in PR #466.

It now reads

Obj o = blocks_new_obj(bipart_get_cpp(x)->left_blocks());
ADDR_OBJ(x)[1] = o;

@ChrisJefferson
Copy link
Contributor Author

Woops, just a little bit too late. I had a quick try of some other functions, and couldn't find anything other obvious memory-related bugs.

@james-d-mitchell
Copy link
Collaborator

This is a duplicate of Issue #444, fixed in the 3.0.15 release, of two days ago 👍

@james-d-mitchell james-d-mitchell added bug Label for issues or PR which report or fix bugs duplicate Label for issues or PR that are duplicates of others 3.0 labels Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label for issues or PR which report or fix bugs duplicate Label for issues or PR that are duplicates of others
Projects
None yet
Development

No branches or pull requests

3 participants