crytic / echidna

Ethereum smart contract fuzzer
https://secure-contracts.com/program-analysis/echidna/index.html
GNU Affero General Public License v3.0
2.69k stars 355 forks source link

[Bug-Candidate]: Coverage html doesn't match source code for certain characters #1168

Open 0xicingdeath opened 7 months ago

0xicingdeath commented 7 months ago

Describe the issue:

The coverage html output doesn't seem to support full unicode output

Code example to reproduce the issue:

If the following is in the contracts:

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  XXXXXXXXXXXXXXXXXXX                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

the coverage output turns it into:

  391 |     |     /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
 392 |     |     /*                  XXXXXXXXXXXXXXXXXXX                   */
 393 |     |     /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
 394 |     | 
 395 |     |     /// @dev Mints `amount` tokens to `to`, increasing the total supply.

Version:

master

Relevant log output:

No response

ggrieco-tob commented 2 months ago

It seems that solc fails to produce correct source mapping in these cases, so not a lot we can do. However, this will be documented in secure-contract.com to make users aware.