Git Product home page Git Product logo

Comments (5)

luncliff avatar luncliff commented on May 20, 2024

Will be reopened if the issue is reproduced.

from coroutine.

luncliff avatar luncliff commented on May 20, 2024

Search results:

Reproduced the environment. The report still comes both with/without libstdc++.so.6.0.25

[ 47%] Linking CXX executable coroutine_test
[100%] Built target coroutine_test
Filters: [yield]
*** Error in `./test/coroutine_test': corrupted double-linked list: 0x00000000016581f0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f9490d477e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x80c71)[0x7f9490d50c71]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f9490d5453c]
./test/coroutine_test[0x419ada]
./test/coroutine_test[0x42c309]
./test/coroutine_test[0x42be07]
./test/coroutine_test[0x42b5f9]
./test/coroutine_test[0x40bfa2]
./test/coroutine_test[0x40cf85]
./test/coroutine_test[0x40ffe2]
./test/coroutine_test[0x460697]
./test/coroutine_test[0x4605cd]
./test/coroutine_test[0x45c865]
./test/coroutine_test[0x45a696]
./test/coroutine_test[0x46504e]
./test/coroutine_test[0x4636b7]
./test/coroutine_test[0x463395]
./test/coroutine_test[0x4c480a]
./test/coroutine_test[0x495fd2]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f9490cf0830]
./test/coroutine_test[0x40bde9]
======= Memory map: ========
00400000-005d2000 r-xp 00000000 00:00 40189                      /mnt/d/coroutine/build/test/coroutine_test
005d2000-005d3000 r-xp 001d2000 00:00 40189                      /mnt/d/coroutine/build/test/coroutine_test
007d3000-007da000 r--p 001d3000 00:00 40189                      /mnt/d/coroutine/build/test/coroutine_test
007da000-007db000 rw-p 001da000 00:00 40189                      /mnt/d/coroutine/build/test/coroutine_test
007db000-007e5000 rw-p 00000000 00:00 0
01652000-01673000 rw-p 00000000 00:00 0                          [heap]
7f948c000000-7f948c021000 rw-p 00000000 00:00 0
7f948c021000-7f9490000000 ---p 00000000 00:00 0
7f94909c0000-7f9490ac8000 r-xp 00000000 00:00 751768             /lib/x86_64-linux-gnu/libm-2.23.so
7f9490ac8000-7f9490aca000 ---p 00108000 00:00 751768             /lib/x86_64-linux-gnu/libm-2.23.so
7f9490aca000-7f9490cc7000 ---p 0000010a 00:00 751768             /lib/x86_64-linux-gnu/libm-2.23.so
7f9490cc7000-7f9490cc8000 r--p 00107000 00:00 751768             /lib/x86_64-linux-gnu/libm-2.23.so
7f9490cc8000-7f9490cc9000 rw-p 00108000 00:00 751768             /lib/x86_64-linux-gnu/libm-2.23.so
7f9490cd0000-7f9490e90000 r-xp 00000000 00:00 751765             /lib/x86_64-linux-gnu/libc-2.23.so
7f9490e90000-7f9490e99000 ---p 001c0000 00:00 751765             /lib/x86_64-linux-gnu/libc-2.23.so
7f9490e99000-7f9491090000 ---p 000001c9 00:00 751765             /lib/x86_64-linux-gnu/libc-2.23.so
7f9491090000-7f9491094000 r--p 001c0000 00:00 751765             /lib/x86_64-linux-gnu/libc-2.23.so
7f9491094000-7f9491096000 rw-p 001c4000 00:00 751765             /lib/x86_64-linux-gnu/libc-2.23.so
7f9491096000-7f949109a000 rw-p 00000000 00:00 0
7f94910a0000-7f94910b7000 r-xp 00000000 00:00 412739             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f94910b7000-7f94910b8000 ---p 00017000 00:00 412739             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f94910b8000-7f94912b6000 ---p 00000018 00:00 412739             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f94912b6000-7f94912b7000 r--p 00016000 00:00 412739             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f94912b7000-7f94912b8000 rw-p 00017000 00:00 412739             /lib/x86_64-linux-gnu/libgcc_s.so.1
7f94912c0000-7f94912c7000 r-xp 00000000 00:00 751748             /lib/x86_64-linux-gnu/librt-2.23.so
7f94912c7000-7f94912c8000 ---p 00007000 00:00 751748             /lib/x86_64-linux-gnu/librt-2.23.so
7f94912c8000-7f94914c6000 ---p 00000008 00:00 751748             /lib/x86_64-linux-gnu/librt-2.23.so
7f94914c6000-7f94914c7000 r--p 00006000 00:00 751748             /lib/x86_64-linux-gnu/librt-2.23.so
7f94914c7000-7f94914c8000 rw-p 00007000 00:00 751748             /lib/x86_64-linux-gnu/librt-2.23.so
7f94914d0000-7f94914e8000 r-xp 00000000 00:00 751752             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f94914e8000-7f94914f2000 ---p 00018000 00:00 751752             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f94914f2000-7f94916e7000 ---p 00000022 00:00 751752             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f94916e7000-7f94916e8000 r--p 00017000 00:00 751752             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f94916e8000-7f94916e9000 rw-p 00018000 00:00 751752             /lib/x86_64-linux-gnu/libpthread-2.23.so
7f94916e9000-7f94916ed000 rw-p 00000000 00:00 0
7f94916f0000-7f9491720000 r-xp 00000000 00:00 411903             /usr/lib/llvm-7/lib/libc++abi.so.1.0
7f9491720000-7f94917f1000 ---p 00030000 00:00 411903             /usr/lib/llvm-7/lib/libc++abi.so.1.0
7f94917f1000-7f949191f000 ---p 00000101 00:00 411903             /usr/lib/llvm-7/lib/libc++abi.so.1.0
7f949191f000-7f9491923000 r--p 0002f000 00:00 411903             /usr/lib/llvm-7/lib/libc++abi.so.1.0
7f9491923000-7f9491924000 rw-p 00033000 00:00 411903             /usr/lib/llvm-7/lib/libc++abi.so.1.0
7f949192f000-7f94919e8000 r-xp 00000000 00:00 411920             /usr/lib/llvm-7/lib/libc++.so.1.0
7f94919e8000-7f9491be7000 ---p 000b9000 00:00 411920             /usr/lib/llvm-7/lib/libc++.so.1.0
7f9491be7000-7f9491bec000 r--p 000b8000 00:00 411920             /usr/lib/llvm-7/lib/libc++.so.1.0
7f9491bec000-7f9491bed000 rw-p 000bd000 00:00 411920             /usr/lib/llvm-7/lib/libc++.so.1.0
7f9491bed000-7f9491bf0000 rw-p 00000000 00:00 0
7f9491bf0000-7f9491bf3000 r-xp 00000000 00:00 751750             /lib/x86_64-linux-gnu/libdl-2.23.so
7f9491bf3000-7f9491bf4000 ---p 00003000 00:00 751750             /lib/x86_64-linux-gnu/libdl-2.23.so
7f9491bf4000-7f9491df2000 ---p 00000004 00:00 751750             /lib/x86_64-linux-gnu/libdl-2.23.so
7f9491df2000-7f9491df3000 r--p 00002000 00:00 751750             /lib/x86_64-linux-gnu/libdl-2.23.so
7f9491df3000-7f9491df4000 rw-p 00003000 00:00 751750             /lib/x86_64-linux-gnu/libdl-2.23.so
7f9491e00000-7f9491e25000 r-xp 00000000 00:00 751751             /lib/x86_64-linux-gnu/ld-2.23.so
7f9491e25000-7f9491e26000 r-xp 00025000 00:00 751751             /lib/x86_64-linux-gnu/ld-2.23.so
7f9492025000-7f9492026000 r--p 00025000 00:00 751751             /lib/x86_64-linux-gnu/ld-2.23.so
7f9492026000-7f9492027000 rw-p 00026000 00:00 751751             /lib/x86_64-linux-gnu/ld-2.23.so
7f9492027000-7f9492028000 rw-p 00000000 00:00 0
7f9492070000-7f9492071000 rw-p 00000000 00:00 0
7f9492080000-7f9492081000 rw-p 00000000 00:00 0
7f9492090000-7f9492091000 rw-p 00000000 00:00 0
7f94920a0000-7f94920a1000 rw-p 00000000 00:00 0
7f94920b0000-7f94920b1000 rw-p 00000000 00:00 0
7f94920c0000-7f94920c1000 rw-p 00000000 00:00 0
7f94920d0000-7f94920d1000 rw-p 00000000 00:00 0
7fffc9d84000-7fffca584000 rw-p 00000000 00:00 0                  [stack]
7fffca653000-7fffca654000 r-xp 00000000 00:00 0                  [vdso]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
coroutine_test is a Catch v2.7.2 host application.
Run with -? for options

-------------------------------------------------------------------------------
async generator status
-------------------------------------------------------------------------------
/mnt/d/coroutine/test/test_runner.cpp:104
...............................................................................

/mnt/d/coroutine/test/test_runner.cpp:104: FAILED:
due to a fatal error condition:
  SIGABRT - Abort (abnormal termination) signal

===============================================================================
test cases: 8 | 7 passed | 1 failed
assertions: 8 | 7 passed | 1 failed

Aborted (core dumped)

from coroutine.

luncliff avatar luncliff commented on May 20, 2024

After some experiment, it seems like clang-7 (7.0.0) version doing something wrong.
https://travis-ci.org/luncliff/coroutine/builds/536815040

Considering to remove clang 7.0.0 for supporting build configuration since 7.1.0 is available from apt, and 8.0 versions are visible in some projects.

from coroutine.

luncliff avatar luncliff commented on May 20, 2024

References

Related Issue?: Coroutine frame's region difference

Found that libc++ yields a bit different address results. The snapshot is taken from the following code.

auto sequence_suspend_and_return(frame& fh) -> sequence<status_t> {
    co_yield fh; // save current coroutine to the `frame`
                 // the `frame` type inherits `suspend_always`
    co_return;   // return without yield
}
auto use_sequence_suspend_and_return(status_t& ref, frame& fs) -> frame {
    for co_await(auto v : sequence_suspend_and_return(fs))
        ref = v;
    ref = 2; // change the value after iteration
};

auto coro_sequence_frame_status_test() {
    frame fs{};

    status_t status = -1;
    auto fc = use_sequence_suspend_and_return(status, fs);
    REQUIRE(status == -1);
    REQUIRE(fs.address() != nullptr);

    clang_frame_prefix* ptr = (clang_frame_prefix*)fc.address();
    printf("%p %p \n", ptr->factivate, ptr->fdestroy);

    for (auto i = 0u; i < 20; ++i) {
        auto* u = (uint64_t*)ptr;
        printf("%p\t%16lx \n", u + i, *(u + i));
    }
    // ...
}

libc++ 7.0 (exact version?)

  • <experimental/coroutine>

checking the exact version info ...

0x569c20 0x56a1c0
0x1602da0                 569c20
0x1602da8                 56a1c0
0x1602db0                    170
0x1602db8           7fffc57aeab0
0x1602dc0           7fffc57aeab8
0x1602dc8       6775626564206f74
0x1602dd0       66206e6f20726567
0x1602dd8           6572756c6961
0x1602de0                1602de8
0x1602de8                1602e70
0x1602df0                1602e20
0x1602df8                      0
0x1602e00                      0
0x1602e08                1602e80
0x1602e10                1602da0
0x1602e18                1602da0
0x1602e20                     e0
0x1602e28                     40
0x1602e30                1602e60
0x1602e38                      0

Custom Header

  • <coroutine/frame.h>
0x56a340 0x56a960
0x177eda0                 56a340
0x177eda8                 56a960
0x177edb0                    170
0x177edb8                     30
0x177edc0                177efa0
0x177edc8       6775626564206f74
0x177edd0       66206e6f20726567
0x177edd8           6572756c6961
0x177ede0                     a0
0x177ede8                     40
0x177edf0                177eda0
0x177edf8                177eda0
0x177ee00                      0
0x177ee08                177ee40
0x177ee10                      0
0x177ee18                      0
0x177ee20                     e0
0x177ee28                     40
0x177ee30           7fffeb5c60a8
0x177ee38           7fffeb5c60b0

from coroutine.

luncliff avatar luncliff commented on May 20, 2024

Removed catch2 usage to analyze this issue more correctly. This issue will be referenced in later issues.

from coroutine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.