gpt4 book ai didi

linux - 排查vcd2fst段错误时调试信息不​​正确

转载 作者:太空宇宙 更新时间:2023-11-04 11:45:15 31 4
gpt4 key购买 nike

我正在使用 vcd2fst 工具(与 GTKwave 一起安装)将 .vcd 文件转换为 .fst,使用以下命令:

vcd2fst -v wave.vcd -f dummy.fst

这在我的主机 Ubuntu 18.04 机器上运行良好。

同时,当在 Ubuntu 16.04 虚拟机上启动相同命令(和相同版本的工具)时,会导致段错误(核心已转储)

尝试使用 GDB 调试结果如下,我猜这与内存分配有关,但即使我将分配的 RAM 从 2GB 增加到 8GB,同样的问题仍然存在。有什么想法吗?

gdb --args vcd2fst -v wave.vcd -f dummy.fst
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vcd2fst...done.
(gdb) run
Starting program: /usr/local/bin/vcd2fst -v wave.vcd -f dummy.fst
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000403de3 in LZ4_hashSequence64 (tableType=<optimized out>,
sequence=<optimized out>) at ./fst/lz4.c:420
420 ./fst/lz4.c: No such file or directory.
(gdb)

以下是段错误发生后的回溯:

(gdb) backtrace
#0 0x0000000000403de3 in LZ4_hashSequence64 (tableType=<optimized out>,
sequence=<optimized out>) at ./fst/lz4.c:420
#1 LZ4_hashSequenceT (tableType=<optimized out>, sequence=<optimized out>)
at ./fst/lz4.c:403
#2 LZ4_hashPosition (tableType=byU32, p=0xffffffffffffffff) at ./fst/lz4.c:407
#3 LZ4_putPosition (
p=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, tableBase=0x7fffffff1a40, tableType=byU32,
srcBase=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at ./fst/lz4.c:421
#4 0x00000000004049a2 in LZ4_compress_generic (acceleration=<optimized out>,
dictIssue=noDictIssue, dict=noDict, tableType=byU32,
outputLimited=notLimited, maxOutputSize=0, inputSize=741835,
dest=0x77b6a0 "x\332\355Y\315r\033\067\f\036\220K-WZ\273Ό\332ؖ\022S\272h'\355\241i\023;\223\203\313͵\235\236rȱ禽\365\001<}\202>C;}\317\342\003\301\325j%\333r\232I\233\214!/\177@\220\004@\220",
source=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, ctx=0x7fffffff1a40) at ./fst/lz4.c:492
#5 LZ4_compress_fast_extState (state=state@entry=0x7fffffff1a40,
source=source@entry=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>,
dest=dest@entry=0x77b6a0 "x\332\355Y\315r\033\067\f\036\220K-WZ\273Ό\332ؖ\022S\272h'\355\241i\023;\223\203\313͵\235\236rȱ禽\365\001<}\202>C;}\317\342\003\301\325j%\333r\232I\233\214!/\177@\220\004@\220",
inputSize=<optimized out>, maxOutputSize=<optimized out>,
acceleration=<optimized out>, acceleration@entry=1) at ./fst/lz4.c:670
#6 0x0000000000405480 in LZ4_compress_fast (
source=source@entry=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>,
dest=dest@entry=0x77b6a0 "x\332\355Y\315r\033\067\f\036\220K-WZ\273Ό\332ؖ\022S\272h'\355\241i\023;\223\203\313͵\235\236rȱ禽\365\001<}\202>C;}\317\342\003\301\325j%\333r\232I\233\214!/\177@\220\004@\220",
inputSize=<optimized out>, maxOutputSize=<optimized out>,
acceleration=acceleration@entry=1) at ./fst/lz4.c:691
---Type <return> to continue, or q <return> to quit---
#7 0x000000000040b183 in LZ4_compress_default (maxOutputSize=<optimized out>,
inputSize=<optimized out>,
dest=0x77b6a0 "x\332\355Y\315r\033\067\f\036\220K-WZ\273Ό\332ؖ\022S\272h'\355\241i\023;\223\203\313͵\235\236rȱ禽\365\001<}\202>C;}\317\342\003\301\325j%\333r\232I\233\214!/\177@\220\004@\220",
source=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>) at ./fst/lz4.c:702
#8 LZ4_compress (
source=source@entry=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>,
dest=dest@entry=0x77b6a0 "x\332\355Y\315r\033\067\f\036\220K-WZ\273Ό\332ؖ\022S\272h'\355\241i\023;\223\203\313͵\235\236rȱ禽\365\001<}\202>C;}\317\342\003\301\325j%\333r\232I\233\214!/\177@\220\004@\220", inputSize=<optimized out>)
at ./fst/lz4.c:1459
#9 0x00000000004145a0 in fstWriterClose (ctx=ctx@entry=0x62e5f0)
at ./fst/fstapi.c:2031
#10 0x00000000004029d6 in fst_main (vname=vname@entry=0x61e370 "wave.vcd",
fstname=fstname@entry=0x61e390 "dummy.fst") at vcd2fst.c:1580
#11 0x0000000000401fa2 in main (argc=5, argv=0x7fffffffdce8) at vcd2fst.c:1822

最佳答案

这是作者 Anthony Bybell 建议的对我有用的解决方案:

在“mmap 兼容性”部分的第 311 行之前添加以下行。

#define __CYGWIN__

关于linux - 排查vcd2fst段错误时调试信息不​​正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57969912/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com