Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1364

Verilator hangs in malloc() when assignment pattern key is not found

Added by Matt Myers about 2 months ago. Updated 18 days ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
TranslationError
% Done:

0%


Description

The following code correctly gives an error message:

%Error: Assignment pattern key 'valids' not found as member

However, Verilator 3.926 does not exit, it hangs

#0  0x00007f6c45dbdc90 in __memcpy_ssse3_back () from /lib64/libc.so.6
#1  0x0000000000430fb0 in char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag) ()
#2  0x00007f6c465e6328 in std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const () from /lib64/libstdc++.so.6
#3  0x000000000040c208 in std::string cvtToStr<int>(int const&) ()
#4  0x00000000004e9ab1 in FileLine::ascii() const ()
#5  0x00000000004e9d63 in operator<<(std::ostream&, FileLine*) ()
#6  0x00000000004eac43 in FileLine::v3errorEnd(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) ()
#7  0x000000000041b8f9 in AstNode::v3errorEnd(std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >&) const ()
#8  0x00000000005d3655 in WidthVisitor::visit(AstPattern*) ()
#9  0x000000000041a7f8 in AstNode::iterateAndNext(AstNVisitor&) ()
#10 0x00000000005ca3a3 in WidthVisitor::visit(AstNodeAssign*) ()
#11 0x000000000041a7f8 in AstNode::iterateAndNext(AstNVisitor&) ()
#12 0x000000000041a87d in AstNode::iterateChildren(AstNVisitor&) ()
#13 0x00000000005bdbdb in WidthVisitor::visit(AstNode*) ()
#14 0x000000000041a7f8 in AstNode::iterateAndNext(AstNVisitor&) ()
#15 0x000000000041a891 in AstNode::iterateChildren(AstNVisitor&) ()
#16 0x00000000005bdbdb in WidthVisitor::visit(AstNode*) ()
#17 0x000000000041a7f8 in AstNode::iterateAndNext(AstNVisitor&) ()
#18 0x000000000041a891 in AstNode::iterateChildren(AstNVisitor&) ()
#19 0x00000000005bdbdb in WidthVisitor::visit(AstNode*) ()
#20 0x000000000041a900 in AstNode::iterateListBackwards(AstNVisitor&) ()
#21 0x000000000041a93a in AstNode::iterateChildrenBackwards(AstNVisitor&) ()
#22 0x00000000005b9c1d in WidthVisitor::visit(AstNetlist*) ()
#23 0x000000000041ccaf in AstNode::iterateSubtreeReturnEdits(AstNVisitor&) ()
#24 0x00000000005b7358 in V3Width::width(AstNetlist*) ()
#25 0x000000000040a82f in process() ()
#26 0x0000000000407461 in main ()

Adding --debug gives:

  CastSizeClc: 1: SEL 0x7446df0 <e736497#> {kj584} @dt=0x6e014e0@(G/sw11)
  CastSizeClc: 1:1: VARREF 0x6784ab0 <e736492#> {kj584} @dt=0x6de6b50@(G/sw32)  NUM_BYTES_4_UPDATE pkg=0x4f17650 [RV] <- VAR 0x4f733c0 <e520685> {kj439} @dt=0x6de6b50@(G/sw32)  NUM_BYTES_4_UPDATE LPARAM
  CastSizeClc: 1:2: CONST 0x7446fc0 <e736493#> {kj584} @dt=0x17dc460@(G/w32)  32'h0
  CastSizeClc: 1:3: CONST 0x7446ec0 <e736494#> {kj584} @dt=0x17dc460@(G/w32)  32'hb
  CastSizeClc: 2: CONST 0x4f8e880 <e736480#> {kj584} @dt=0xb14cd0@(G/swu32/4)  ?32?shb
%Error: : Assignment pattern key 'valids' not found as member
-node: TEXT 0x61f35d0 <e356067> {ni23} "valids" 
Code:
module test (input wire clk,
             input wire res_n);

    typedef struct packed {
        logic [3:0] port_num;
    } info_struct;

    info_struct myinfo;

    always_comb
        myinfo = '{default: '0,
                   valids: '1};

endmodule

History

#1 Updated by Matt Myers about 2 months ago

Confirmed this happens in 4.006 as well

#2 Updated by Wilson Snyder about 2 months ago

  • Category set to TranslationError
  • Status changed from New to Resolved
  • Assignee set to Wilson Snyder

Thanks for the report. Fixed in git towards 4.008.

#3 Updated by Wilson Snyder 18 days ago

  • Status changed from Resolved to Closed

In 4.008.

Also available in: Atom