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

Fix crash when compiling is_list/1 call #7518

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Jul 31, 2023

Fixes #7504

@bjorng bjorng added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Jul 31, 2023
@bjorng bjorng requested a review from jhogberg July 31, 2023 04:30
@bjorng bjorng self-assigned this Jul 31, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 31, 2023

CT Test Results

       2 files     296 suites   13m 19s ⏱️
   778 tests    776 ✔️ 2 💤 0
4 921 runs  4 919 ✔️ 2 💤 0

Results for commit f9a3fa9.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng added this to the OTP-26.0.3 milestone Jul 31, 2023
@bjorng bjorng linked an issue Jul 31, 2023 that may be closed by this pull request
@bjorng bjorng force-pushed the bjorn/compiler/fix-is_list-crash/GH-7504/OTP-18689 branch from 2764673 to 7f94589 Compare July 31, 2023 04:44
@bjorng bjorng linked an issue Jul 31, 2023 that may be closed by this pull request
@bjorng bjorng force-pushed the bjorn/compiler/fix-is_list-crash/GH-7504/OTP-18689 branch from 7f94589 to f9a3fa9 Compare July 31, 2023 04:50
@bjorng bjorng linked an issue Jul 31, 2023 that may be closed by this pull request
Comment on lines +1280 to +1284
%% This instruction was a call to is_list/1, which was
%% rewritten to an is_nonempty_list test by
%% beam_ssa_type. BEAM has no is_nonempty_list instruction
%% that will return a boolean, so we must revert it to an
%% is_list/1 call.
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the relative rarity of needing boolean values from type tests, I wonder if it wouldn't be better to convert them at an early stage from A = is_xyz(X) to something like A = if is_xyz(X) -> true; not is_xyz(X) -> false end (it would also simplify some of the work I'm doing 😄).

@bjorng bjorng merged commit 1ea0b3e into erlang:maint Aug 1, 2023
14 of 15 checks passed
@bjorng bjorng deleted the bjorn/compiler/fix-is_list-crash/GH-7504/OTP-18689 branch August 1, 2023 10:41
@bjorng bjorng restored the bjorn/compiler/fix-is_list-crash/GH-7504/OTP-18689 branch August 1, 2023 10:44
@bjorng bjorng deleted the bjorn/compiler/fix-is_list-crash/GH-7504/OTP-18689 branch September 18, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[erlc] internal consistency check: uninitialized_reg
2 participants