Skip to content

Z3 crashes on string formula #2562

@muchang

Description

@muchang

Hi,
For this formula:

(declare-fun a () String)     
(declare-fun b () String)     
(declare-fun c () String)     
(assert (= (str.substr a 0 (str.len b)) ""))     
(assert (=      
            (ite      
                (= (str.len (str.substr (str.replace (str.replace a b "") "29M8u" "") 1 (- (str.len c) 1))) 0) 1 0
            )      
            0       
        )      
)     
(check-sat)   

Z3 will crash with this error message:

Failed to verify: get_length(e, len1)
*** stack smashing detected ***: <unknown> terminated
[1]    65175 abort      z3/build-2019-09-14-69abe16-no_asserts/z3

OS: Ubuntu 18.04
Revision: 69abe16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions