Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update fromCString to avoid allocation errors (#54)
This commit reverts the implementation of `fromCString` to the one before revision 22b5230 in order to avoid allocation errors when getting environment variables and command line arguments. The underlying issue with its implementation seems to be related to passing the maximum integer value instead of the actual size, resulting in an allocation overflow at runtime. Another potential solution for this could be using the safe mechanisms provided by AssemblyScript (`changetype` and `decode`, but there seem to be some intermittent GC-related issues when using them, and this requires some more investigation). Signed-off-by: Radu M <[email protected]> Co-authored-by: Matt Butcher <[email protected]> Co-authored-by: Matt Butcher <[email protected]>
- Loading branch information