freehdl's /usr/bin/freehdl-v2cc crashes with sigsegv
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
freehdl (Gentoo Linux) |
Expired
|
Medium
|
|||
freehdl (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When running freehdl-v2cc[1] on Bionic[2] it crashes with segmentation fault:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b7c078 in m_vaul_
Before that it complains about improper memory access:
__GI__IO_file_open (is32not64=1, read_write=8, prot=438, posix_mode=
filename=0x8 <error: Cannot access memory at address 0x8>, fp=0x5555558629f0) at fileops.c:190
It looks like this:
$gvhdl test.vhd
gvhdl: FreeHDL root path is '/usr'.
gvhdl: executing '/usr/bin/
gvhdl: Compilation failed!
Died at /usr/bin/gvhdl line 211.
[1] freehdl:
Installed: 0.0.8-2.2ubuntu2
libfreehdl0:
Installed: 0.0.8-2.2ubuntu2
libfreehdl0-dev:
Installed: 0.0.8-2.2ubuntu2
[2] $lsb_release -rd
Description: Ubuntu 18.04 LTS
Release: 18.04
tags: | added: bionic |
Changed in freehdl (Gentoo Linux): | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in freehdl (Gentoo Linux): | |
status: | New → Expired |
Created attachment 522474 0.0.8-declerati ve_region. patch
freehdl-
With sci-electronics /freehdl- 0.0.8 the freehdl-v2cc command returns Segmentation fault even for the simplest VHDL demo (https:/ /ghdl.readthedo cs.io/en/ latest/ using/QuickStar tGuide. html). It also does for any schematic I tried in Qucs.
I did some backtrace and suggest a patch which seems to fix this issue.
As the source file 'v2cc/v2cc-chunk.t' states,
;; respect to the entity). Note that the value is set to NULL if declaration/ expression is not static at all! DeclarativeRegi on static_ declarative_ region (= "NULL"))
;; the object/
(IIR_
so my patch provides a simple check of the NULL pointer. I am not sure my solution is correct, but at least, it allows me to use freehdl-v2cc.