Skip to content

Generator: segmentation fault on a unary min or max - #1536

Open
agarny wants to merge 9 commits into
cellml:mainfrom
agarny:issue1533
Open

agarny wants to merge 9 commits into
cellml:mainfrom
agarny:issue1533

Conversation

@agarny

@agarny agarny commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #1533.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the unary min/max simplification and related operator-validation changes.

No open issues 🎉

Review effort: Balanced


namespace {

std::string implementationCode(const std::string &fileName, bool needMinFunction, bool needMaxFunction)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of the needMinFunction argument if you are not going to use it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used at line 39.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is used at line 39, but it is never anything other than false?

@agarny agarny Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, sorry! I completely overlooked it! Fixed in ea8b8ad.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at this point I would have just created on generatorunary test file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean merge tests/generator/generatorunaryminmax.cpp and tests/generator/generatorunaryminus.cpp? If so, I would probably agree and happy to do it, if that's what you meant.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is what I meant.

@agarny agarny Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ea8b8ad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generator: segmentation fault on a unary min or max

3 participants