fix panic in current_prolog_flag/2 when arguments are the same variable
This commit is contained in:
@@ -9233,10 +9233,9 @@ impl Machine {
|
||||
|
||||
#[inline(always)]
|
||||
pub(crate) fn is_sto_enabled(&mut self) {
|
||||
self.machine_st.unify_atom(
|
||||
self.machine_st.occurs_check.flag_value(),
|
||||
self.machine_st.registers[1],
|
||||
);
|
||||
let a1 = self.deref_register(1);
|
||||
self.machine_st
|
||||
.unify_atom(self.machine_st.occurs_check.flag_value(), a1);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
||||
2
tests-pl/issue2914.pl
Normal file
2
tests-pl/issue2914.pl
Normal file
@@ -0,0 +1,2 @@
|
||||
:- initialization(main).
|
||||
main :- ( current_prolog_flag(X, X) -> write(true) ; write(false) ).
|
||||
@@ -20,6 +20,13 @@ fn issue2588_load_html() {
|
||||
load_module_test("tests-pl/issue2588.pl", "[element(html,[],[element(head,[],[element(title,[],[[H,e,l,l,o,!]])]),element(body,[],[])])]");
|
||||
}
|
||||
|
||||
// issue #2914
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore = "unsupported operation when isolation is enabled")]
|
||||
fn issue2914_current_prolog_flag_shared_var() {
|
||||
load_module_test("tests-pl/issue2914.pl", "false");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(miri, ignore = "unsupported operation when isolation is enabled")]
|
||||
fn issue3256_load_xml_returns_list() {
|
||||
|
||||
Reference in New Issue
Block a user