Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault with syntax error #152

Closed
sbdchd opened this issue Mar 25, 2017 · 1 comment
Closed

Segfault with syntax error #152

sbdchd opened this issue Mar 25, 2017 · 1 comment

Comments

@sbdchd
Copy link

sbdchd commented Mar 25, 2017

❯ iverilog -v
Icarus Verilog version 11.0 (devel) (02ed16a)

From the following command

❯ iverilog -t null -W all test.sv

test.sv

module d();
       nand n2(w1,

       nand n1(w2);
endmodule
Process:               ivl [67057]
Path:                  /usr/local/Cellar/icarus-verilog/HEAD-02ed16a/lib/ivl/ivl
Identifier:            ivl
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        sh [67055]
Responsible:           iTerm2 [60852]

Date/Time:             2017-03-25 15:24:17.577 -0400
OS Version:            Mac OS X 10.10.5 (14F2109)
Report Version:        11


Time Awake Since Boot: 240000 seconds
Time Since Wake:       15000 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008

VM Regions Near 0x8:
--> 
    __TEXT                 0000000103ae5000-0000000103cc9000 [ 1936K] r-x/rwx SM=COW  /usr/local/Cellar/icarus-verilog/HEAD-02ed16a/lib/ivl/ivl

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ivl                           	0x0000000103bde149 pform_makegates(vlltype const&, PGBuiltin::Type, str_pair_t, std::__1::list<PExpr*, std::__1::allocator<PExpr*> >*, svector<lgate>*, std::__1::list<named<PExpr*>, std::__1::allocator<named<PExpr*> > >*) + 656
1   ivl                           	0x0000000103bc1f54 VLparse() + 3561
2   ivl                           	0x0000000103be518e pform_parse(char const*, __sFILE*) + 147
3   ivl                           	0x0000000103ae86a6 main + 8283
4   libdyld.dylib                 	0x00007fff9a3695c9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00007fe921405be0  rcx: 0x0000000000000000  rdx: 0x0000000600000006
  rdi: 0x00007fff5c115448  rsi: 0x0000000000000001  rbp: 0x00007fff5c1146e0  rsp: 0x00007fff5c114650
   r8: 0x00007fe921405be0   r9: 0x0000000000000000  r10: 0x0000000103c86130  r11: 0x0000000103c86650
  r12: 0x00007fe921405d40  r13: 0x0000000000000000  r14: 0x00007fe921405d28  r15: 0x0000000000000000
  rip: 0x0000000103bde149  rfl: 0x0000000000010246  cr2: 0x0000000000000008
  
Logical CPU:     2
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x103ae5000 -        0x103cc8fff +ivl (0) <082976DE-E28B-3FD6-AB45-2BAA017DFFE0> /usr/local/Cellar/icarus-verilog/HEAD-02ed16a/lib/ivl/ivl
    0x7fff66d08000 -     0x7fff66d3e92f  dyld (353.2.4) <708E385E-50C6-32A3-983C-42E97BEE4346> /usr/lib/dyld
    0x7fff8d823000 -     0x7fff8d82bfff  libsystem_dnssd.dylib (576.50.2) <9EC5AF92-D0D2-3BDE-92B6-D3730D3865C8> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff8dd89000 -     0x7fff8dd8dfff  libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
    0x7fff8ddc2000 -     0x7fff8ddc3fff  libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
    0x7fff8e956000 -     0x7fff8e958ff7  libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff8fcf8000 -     0x7fff8fcfeff7  libsystem_networkextension.dylib (167.40.3) <BA58B30B-8377-3B0A-8AE3-4F84021D9D4E> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff8fff6000 -     0x7fff8fff6ff7  libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
    0x7fff8fff7000 -     0x7fff9001ffff  libxpc.dylib (559.40.1) <5C829202-962E-3744-8B50-00D38CC88E84> /usr/lib/system/libxpc.dylib
    0x7fff90022000 -     0x7fff90038ff7  libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
    0x7fff9032f000 -     0x7fff90338ff7  libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
    0x7fff9076c000 -     0x7fff9076efff  libsystem_configuration.dylib (699.40.2) <56F94DCE-DBDE-3615-8F07-DE6270D9F8BE> /usr/lib/system/libsystem_configuration.dylib
    0x7fff90831000 -     0x7fff90832ff3  libSystem.B.dylib (1213) <4B24B5BE-45F2-355A-9A35-D438A516D140> /usr/lib/libSystem.B.dylib
    0x7fff90833000 -     0x7fff90879ff7  libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
    0x7fff909d4000 -     0x7fff909d9ff7  libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
    0x7fff90c0c000 -     0x7fff90c11ff7  libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
    0x7fff90f2a000 -     0x7fff90f55fff  libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
    0x7fff92691000 -     0x7fff9270afe7  libcorecrypto.dylib (233.30.1) <5779FFA0-4D9A-3AD4-B7F2-618227621DC8> /usr/lib/system/libcorecrypto.dylib
    0x7fff92768000 -     0x7fff9276dfff  libsystem_stats.dylib (163.30.2) <CDB327EF-3C80-362F-9BF6-718CBBC5DB24> /usr/lib/system/libsystem_stats.dylib
    0x7fff9401f000 -     0x7fff94028fff  libsystem_pthread.dylib (105.40.1) <ACE90967-ECD0-3251-AEEB-461E3C6414F7> /usr/lib/system/libsystem_pthread.dylib
    0x7fff94029000 -     0x7fff9402affb  libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
    0x7fff95171000 -     0x7fff95172fff  libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff95c17000 -     0x7fff95c4ffff  libsystem_network.dylib (412.20.3) <6105C134-6722-3C0A-A4CE-5E1261E2E1CC> /usr/lib/system/libsystem_network.dylib
    0x7fff96188000 -     0x7fff9638246f  libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib
    0x7fff97360000 -     0x7fff973b4fff  libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
    0x7fff977b9000 -     0x7fff977e3ff7  libdispatch.dylib (442.50.1) <A61E703C-784A-3698-B513-75DD12AAD6DC> /usr/lib/system/libdispatch.dylib
    0x7fff9783f000 -     0x7fff97847ffb  libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
    0x7fff9907d000 -     0x7fff9908eff3  libsystem_coretls.dylib (35.40.1) <155DA0A9-2046-332E-BFA3-D7974A51F731> /usr/lib/system/libsystem_coretls.dylib
    0x7fff99c76000 -     0x7fff99c76ff7  liblaunch.dylib (559.40.1) <4F81CA3A-D2CE-3030-A89D-42F3DAD7BA8F> /usr/lib/system/liblaunch.dylib
    0x7fff9a366000 -     0x7fff9a369ff7  libdyld.dylib (353.2.4) <224F35C5-6E35-3EC4-A97C-80949CE444E7> /usr/lib/system/libdyld.dylib
    0x7fff9a494000 -     0x7fff9a49afff  libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib
    0x7fff9a49b000 -     0x7fff9a4b8fff  libsystem_kernel.dylib (2782.50.9) <C09DE9E0-DFDC-345A-8CF7-97CCB62168A6> /usr/lib/system/libsystem_kernel.dylib
    0x7fff9a4b9000 -     0x7fff9a4d5ff7  libsystem_malloc.dylib (53.30.1) <DDA8928B-CC0D-3255-BD8A-3FEA0982B890> /usr/lib/system/libsystem_malloc.dylib
    0x7fff9aaa8000 -     0x7fff9aaafff7  libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
    0x7fff9aee1000 -     0x7fff9aee9fff  libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
    0x7fff9b104000 -     0x7fff9b10ffff  libcommonCrypto.dylib (60061.30.1) <E789748D-F9A7-3CFF-B317-90DF348B1E95> /usr/lib/system/libcommonCrypto.dylib
    0x7fff9b12f000 -     0x7fff9b12fff7  libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
    0x7fff9b6d9000 -     0x7fff9b6dbfff  libquarantine.dylib (76.20.1) <7AF90041-2768-378A-925A-D83161863642> /usr/lib/system/libquarantine.dylib
    0x7fff9b983000 -     0x7fff9b985fff  libsystem_sandbox.dylib (358.20.5) <3F5E973F-C702-31AC-97BC-05F5C195683C> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff9be48000 -     0x7fff9be70fff  libsystem_info.dylib (459.40.1) <2E16C4B3-A327-3957-9C41-143911979A1E> /usr/lib/system/libsystem_info.dylib
    0x7fff9bf60000 -     0x7fff9bf90fff  libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
    0x7fff9bf91000 -     0x7fff9c01dfef  libsystem_c.dylib (1044.40.3) <2E673D96-E334-37D2-833A-E57383BBA377> /usr/lib/system/libsystem_c.dylib
    0x7fff9d0fd000 -     0x7fff9d0feff7  libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 4074853
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=79.2M resident=16.6M(21%) swapped_out_or_unallocated=62.6M(79%)
Writable regions: Total=18.6M written=324K(2%) resident=1700K(9%) swapped_out=0K(0%) unallocated=17.0M(91%)
 
REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                             10.2M
MALLOC (admin)                       16K
STACK GUARD                        56.0M
Stack                              8192K
VM_ALLOCATE                           8K
__DATA                              888K
__LINKEDIT                         71.5M
__TEXT                             7892K
shared memory                         4K
===========                      =======
TOTAL                             154.3M

Model: MacBookPro12,1, BootROM MBP121.0167.B18, 2 processors, Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.6f4 17916, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Network Service: USB 10/100/1000 LAN, Ethernet, en4
Serial ATA Device: APPLE SSD SM0256G, 251 GB
USB Device: Internal Memory Card Reader
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

martinwhitaker added a commit that referenced this issue Apr 21, 2017
If there is a syntax error in the source code, pform_makegate may be
passed a null list of port connections. The error is already reported,
so we just need to ignore it.
martinwhitaker added a commit that referenced this issue Apr 21, 2017
If there is a syntax error in the source code, pform_makegate may be
passed a null list of port connections. The error is already reported,
so we just need to ignore it.

(cherry picked from commit 8a5cbd4)
@martinwhitaker
Copy link
Collaborator

Fixed in both master and v10 branches. Thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants