argotorg / argotorg/solidity

soltest should look for VM shared libraries in a location relative to the test directory

Open
#11,614 21 comments 0 reactions 1 assignee Claimed by @christianparpart View on GitHub
bug :bug: low effort low impact nice to have testing :hammer:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

Extracted from https://github.com/ethereum/solidity/pull/11613#discussion_r663927349.
Related to #11374.

Currently soltest/isoltest looks for dynamic libraries like `libevmone.so` in its current working directory and directories relative to it. This could ~be a security issue if the current directory happens to contain a malicious library with that name~ load the wrong library or not find the right library depending where the user happens to run it from.

It would be better to search relative to the test directory, especially when `--testpath` option is used to specify that directory.

~It should be using the directory where the executable is located as a base instead.~ As an additional heuristic it could look for the library also directly in the directory where executable is located. I think it should not look in the current working directory at all (unless it just happens to match one of the other dirs it searches).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.