Skip to content

Commit a19af44

Browse files
committed
fix: overflow in r1cs trans on shifts
1 parent 291af0b commit a19af44

6 files changed

Lines changed: 177 additions & 33 deletions

File tree

Cargo.lock

Lines changed: 111 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ circ_opt = { path = "circ_opt" }
1212
circ_hc = { path = "circ_hc", default-features = false, features = ["rc", "lru"]}
1313
circ_waksman = { path = "circ_waksman" }
1414
rug = { version = "1.11", features = ["serde"] }
15-
gmp-mpfr-sys = { version = "1.4", optional = true }
15+
gmp-mpfr-sys = { version = "1.6", optional = true }
1616
lazy_static = { version = "1.4", optional = true }
1717
rand = "0.8"
1818
rand_chacha = "0.3"
@@ -26,7 +26,7 @@ typed-arena = { version = "2.0", optional = true }
2626
log = "0.4"
2727
thiserror = "1.0"
2828
bellman = { git = "https://github.com/alex-ozdemir/bellman.git", branch = "mirage", optional = true }
29-
rug-polynomial = { version = "0.2.5", optional = true }
29+
rug-polynomial = { version = "0.2.6", optional = true }
3030
rayon = { version = "1", optional = true }
3131
ff = { version = "0.12", optional = true }
3232
fxhash = "0.2"

circ_fields/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl FieldV {
314314
let ptr: *const FullFieldV = self.0 as *const _;
315315
unsafe { &*ptr }
316316
}
317-
fn full_cow(&self) -> std::borrow::Cow<FullFieldV> {
317+
fn full_cow<'a>(&'a self) -> std::borrow::Cow<'a, FullFieldV> {
318318
if self.is_full() {
319319
std::borrow::Cow::Borrowed(self.full_ref())
320320
} else {

src/ir/term/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ pub struct IrWrapper<'a, T> {
228228
}
229229

230230
/// Wrap a reference for IR formatting. Uses [IrCfg::from_circ_cfg].
231-
pub fn wrap<T>(t: &T) -> IrWrapper<T> {
231+
pub fn wrap<T>(t: &T) -> IrWrapper<'_, T> {
232232
IrWrapper::new(t, IrCfg::from_circ_cfg())
233233
}
234234

src/ir/term/text/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Debug for TokTree<'_> {
125125
}
126126

127127
/// Parse a token tree.
128-
fn parse_tok_tree(bytes: &[u8]) -> TokTree {
128+
fn parse_tok_tree(bytes: &[u8]) -> TokTree<'_> {
129129
let mut stack: Vec<Vec<TokTree>> = vec![vec![]];
130130
let lex = Token::lexer(bytes).spanned();
131131
for (t, s) in lex {

0 commit comments

Comments
 (0)