Skip to content

New WASM griddly_test execution incurs segfault #288

@maichmueller

Description

@maichmueller

Describe the bug
Running the Griddly_Test.js executable as built for WASM in #287 via node Griddly_Test.js causes a segmentation fault.

node Debug/bin/Griddly_Test.js 
[==========] Running 269 tests from 15 test suites.
[----------] Global test environment set-up.
[----------] 5 tests from AStarPathFinderTest
[ RUN      ] AStarPathFinderTest.searchAllPassableSeek
/home/michael/GitHub/Griddly/Debug/bin/Griddly_Test.js:147
      throw ex;
      ^

RuntimeError: memory access out of bounds
    at long std::__2::__libcpp_atomic_refcount_increment<long>(long&) (wasm://wasm/21b25156:wasm-function[1355]:0x8f751)
    at std::__2::__shared_count::__add_shared() (wasm://wasm/21b25156:wasm-function[1354]:0x8f6f5)
    at std::__2::__shared_weak_count::__add_shared() (wasm://wasm/21b25156:wasm-function[161]:0x23562)
    at std::__2::shared_ptr<testing::internal::ExpectationBase>::shared_ptr(std::__2::shared_ptr<testing::internal::ExpectationBase> const&) (wasm://wasm/21b25156:wasm-function[5347]:0x17c62b)
    at testing::Expectation::Expectation(testing::Expectation const&) (wasm://wasm/21b25156:wasm-function[60461]:0x105507f)
    at void std::__2::allocator<std::__2::__tree_node<testing::Expectation, void*>>::construct<testing::Expectation, testing::Expectation const&>(testing::Expectation*, testing::Expectation const&) (wasm://wasm/21b25156:wasm-function[60455]:0x1054ebd)
    at void std::__2::allocator_traits<std::__2::allocator<std::__2::__tree_node<testing::Expectation, void*>>>::construct<testing::Expectation, testing::Expectation const&, void>(std::__2::allocator<std::__2::__tree_node<testing::Expectation, void*>>&, testing::Expectation*, testing::Expectation const&) (wasm://wasm/21b25156:wasm-function[60445]:0x1054a9c)
    at invoke_viii (/home/michael/GitHub/Griddly/Debug/bin/Griddly_Test.js:5275:29)
    at std::__2::unique_ptr<std::__2::__tree_node<testing::Expectation, void*>, std::__2::__tree_node_destructor<std::__2::allocator<std::__2::__tree_node<testing::Expectation, void*>>>> std::__2::__tree<testing::Expectation, testing::Expectation::Less, std::__2::allocator<testing::Expectation>>::__construct_node<testing::Expectation const&>(testing::Expectation const&) (wasm://wasm/21b25156:wasm-function[60431]:0x10542e5)
    at std::__2::pair<std::__2::__tree_iterator<testing::Expectation, std::__2::__tree_node<testing::Expectation, void*>*, long>, bool> std::__2::__tree<testing::Expectation, testing::Expectation::Less, std::__2::allocator<testing::Expectation>>::__emplace_unique_key_args<testing::Expectation, testing::Expectation const&>(testing::Expectation const&, testing::Expectation const&) (wasm://wasm/21b25156:wasm-function[60428]:0x1053da4)

Node.js v17.9.1

To Reproduce
Steps to reproduce the behavior:

  1. Checkout the branch of WASM griddly tests configuration #287
  2. Build Griddly_Test with the WASM configuration as per readme
  3. run the test with node

Expected behavior
A normal execution of the tests and failing/succeeding tests.

Desktop

  • OS: Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    GriddlyJSAn issues specifically relating to GriddlyJShelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions