Re: __memmove_avx_unaligned_erms throws segmentation fault in release mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2021-07-08 at 16:42 +0000, Mahmood N via Gcc-help wrote:
> Hi
> 
> I see that my program works fine in the debug mode, but not in the
> release mode. With GDB I was able to find the function that got error.
> The code looks like
> 
> 
> 
>   std::vector<std::vector<inst_trace_t> *> threadblock_traces;
>   ...
>   printf("hello %d\n",threadblock_traces.size());

At least you can't use "%d" to print the result of
std::vector<T>::size() (which is not an `int`).

>   trace_kernel.get_next_threadblock_traces(threadblock_traces);
> 

Try to find the bug of your code with warnings, sanitizers, or
-D_GLIBCXX_DEBUG.

-- 
Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux