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

bitwise_left_shift: Value mismatch during fuzzer run with nested call affecting upstream function call #12330

Open
peterenescu opened this issue Feb 14, 2025 · 0 comments
Labels
bug Something isn't working fuzzer-found triage Newly created issue that needs attention.

Comments

@peterenescu
Copy link
Contributor

Bug description

Reproduction

presto:di> select bitwise_left_shift(4111, mod((-607622555), INTEGER '530883235'));
  _col0               
---------
 1052416 
(1 row)

presto:di> select bitwise_left_shift(c0, mod((- c1), INTEGER '530883235')) from (values (4111, 607622555) ) t(c0, c1);
 _col0                
-------
     0 
(1 row)

Error propagates upstream to fuzzer execution of separate Presto function bitwise_or:

I0213 15:44:53.542584 2187193 PrestoQueryRunner.cpp:673] Execute presto sql: SELECT bitwise_or(SMALLINT '3808', abs((bitwise_left_shift(c0, mod((- c1), INTEGER '530883235')) - mod(ceil(c2), SMALLINT '32076')))) as p0, row_number as p1 FROM (t_values)

I0213 15:44:53.542584 2187193 PrestoQueryRunner.cpp:673] Execute presto sql: SELECT bitwise_or(SMALLINT '3808', abs((bitwise_left_shift(c0, mod((- c1), INTEGER '530883235')) - mod(ceil(c2), SMALLINT '32076')))) as p0, row_number as p1 FROM (t_values)
fbcode/velox/exec/tests/utils/QueryAssertions.cpp:1182: Failure
Failed
Expected 100, got 100
10 extra rows, 10 missing rows
10 of extra rows:
	4082 | 16
	7922 | 59
	7929 | 26
	8169 | 94
	12272 | 47
	16383 | 21
	24295 | 64
	24316 | 70
	24316 | 78
	28395 | 32

10 of missing rows:
	4078 | 16
	4087 | 64
	7907 | 26
	12001 | 21
	12028 | 78
	20208 | 47
	20459 | 32
	20471 | 94
	24558 | 59
	32752 | 70

Unexpected results

System information

?

Relevant logs

@peterenescu peterenescu added bug Something isn't working triage Newly created issue that needs attention. labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer-found triage Newly created issue that needs attention.
Projects
None yet
Development

No branches or pull requests

2 participants