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

Comparison against x and z leads to verilator crash #620

Closed
veripoolbot opened this issue Feb 20, 2013 · 3 comments
Closed

Comparison against x and z leads to verilator crash #620

veripoolbot opened this issue Feb 20, 2013 · 3 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jason McMullan (@ezrec)
Original Redmine Issue: 620 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


Verilator: Feb 19, 2013 (f2fb77c)

The following test causes Verilator to crash in V3Tristate.cpp:

             AstPin* outpinp;
             {
                 AstVar* outModVarp = (AstVar*) nodep->modVarp()->user4p();
// BUG - outModVarp is NULL here
                 AstNode* outexprp = nodep->exprp()->cloneTree(false);  // Note has lvalue() set
                 outpinp = new AstPin(nodep->fileline(),
                                      nodep->pinNum(),
// CRASH - Null pointer dereference
                                      outModVarp->name(),  // should be {var}"__out"
                                      outexprp);

Test case code 'textcase_xz.v':

module testcase_xz (
     input clk,
     output out
);

reg out;

always @(posedge clk)
begin
     if ( clk !== 1'bx && clk !== 1'bz )
     begin
         out <= ~out;
     end
end

endmodule

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jason McMullan (@ezrec)
Original Date: 2013-02-20T21:10:00Z


This build was compiled with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) on an x86_64 architecture.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-02-21T11:50:40Z


Thanks for a good small testcase. The crash was easy enough to fix, but it exposed a big test hole with input only tristates that needs fixing. Stay tuned.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-04-02T12:59:00Z


Resolved a long time ago, forgot to close.

@veripoolbot veripoolbot added the resolution: fixed Closed; fixed label Dec 22, 2019
tgorochowik pushed a commit to antmicro/verilator that referenced this issue Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants