Skip to content

Problems when hex file has wrong encoding #198

@Intrpt

Description

@Intrpt

Describe the bug
Docker containers are not starting when the input hex file is in UTF-16 LE format.

I compiled a solidity file using the command solc --bin-runtime --allow-paths ./node_modules/ ./samples/Government.sol > test.rt.hex in Windows Powershell. This results in a file in UTF-16 LE format.
When I try to run smartbugs (Vandal) on this file using the command python -m sb -t Vandal -f samples/test.rt.hex in Powersell, then I face the issue that no containers are starting and smartbugs gets stuck in "Starting task 1/1: Vandal and test.rt.hex".

Smartbugs could verify the file format and print an error.

Platform
SmartBugs 2.0.10
Python 3.11.9.final.0 (64 bit)
Windows 10 10.0.22631
CPU 11th Gen Intel(R) Core(TM) i7-11375H @ 3.30GHz
Powershell version 5.1

Additional context
result of cmd file tsxt.rt.hex
test.rt.hex: Unicode text, UTF-16, little-endian text, with very long lines (8044), with CRLF line terminators

result of cmd head -c3 test.rt.hex | hexdump -C
00000000 ff fe 36 |...|
00000003

The compiled file:
test.rt.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions