question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vermin assumes byte union to be a type union

See original GitHub issue

Describe the bug

The following line is assumed to be a type union (3.10) by vermin:

if (global_byte | local_byte) != global_byte:

To Reproduce Found while scanning the kafl.fuzzer project with vermin.

$ vermin -vvv kafl_fuzzer | grep 3.10
!2, 3.10     /home/mtarral/kAFL/kafl/fuzzer/kafl_fuzzer/manager/bitmap.py
  L93: union types as `X | Y` requires !2, 3.10
Minimum required versions: 3.10

You can check the “faulty” line

Expected behavior This shouldn’t be flagged as a union type (and shouldn’t require 3.10, since our software runs fine on 3.8)

Environment (please complete the following information):

  • Vermin version: 1.4.2 (pip)

Thanks for vermin !

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Wenzelcommented, Sep 19, 2022

Yes, I confirm it works on my side ! image

Thank you very much 🙏

1reaction
netromdkcommented, Sep 19, 2022

Hi! It’s in a branch right now. I was able to reproduce and fix it.

You can try it out: issue-103

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handbook - Unions and Intersection Types - TypeScript
A union type describes a value that can be one of several types. We use the vertical bar ( | ) to separate...
Read more >
Union declaration - cppreference.com
A union is a type consisting of a sequence of members whose storage overlaps (as opposed to struct, which is a type consisting...
Read more >
Union type - Wikipedia
A union can be pictured as a chunk of memory that is used to store variables of different data types. Once a new...
Read more >
Can a type which is a union member alias that union?
In this example, pointers to int and double, both of which are members of union u, are passed to a function where a...
Read more >
The worst mistake of computer science - Lucidchart
The essential difference is that there is no more union–statically typed or dynamically assumed–between NULL and every other type, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found