diff --git a/CMakeLists.txt b/CMakeLists.txt index 688cd54..fff12c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,9 @@ endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS - # "${CMAKE_CXX_FLAGS} -static") + # "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} + # -fsanitize=address ") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address + # ") set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load") # set(NO_WHOLE_ARCHIVE_PREFIX "") diff --git a/tile/fiber/detail/asm/ucontext_aarch64.S b/tile/fiber/detail/asm/ucontext_aarch64.S index bff94d3..8c682e7 100644 --- a/tile/fiber/detail/asm/ucontext_aarch64.S +++ b/tile/fiber/detail/asm/ucontext_aarch64.S @@ -50,7 +50,8 @@ // x1: to .text .global TILE_ASM_SYMBOL(tile_ucontext_swap) -.balign 16 +// .balign 16 +.align 8 TILE_ASM_SYMBOL(tile_ucontext_swap): // Save context 'from' diff --git a/tile/fiber/detail/fiber.cc b/tile/fiber/detail/fiber.cc index 64a7908..c633fd1 100644 --- a/tile/fiber/detail/fiber.cc +++ b/tile/fiber/detail/fiber.cc @@ -44,7 +44,8 @@ std::unique_ptr Fiber::Create(std::function proc) noexcept { Fiber::Fiber(std::function proc) : ctx_(object_pool::Get().Leak()), proc_(std::move(proc)) { - memset(&ctx_->uctx, 0, sizeof(tile_ucontext_t)); + // memset(&ctx_->uctx, 0, sizeof(tile_ucontext_t)); + // memset(&ctx_->stack, 0, kStackSize); if (proc_) { tile_ucontext_set_target(&ctx_->uctx, &ctx_->stack, kStackSize, RunProc, &proc_);