• Home
  • Technology
  • Gaming
  • Entertainment
  • World & Business
  • Science
  • Sports
  • AI
HomeTechnologyGamingEntertainmentWorld & BusinessScienceSportsAI
Technology

Rust struct lifetime requirements can be bypassed through covariant field assignment

The issue’s author reports that an example compiles but crashes under AddressSanitizer with a stack-use-after-scope error.

10m agofirst seen 10m ago

TLDR

A Rust contributor reports that assigning a short-lived reference to a struct field can bypass the struct’s lifetime requirements. Their example compiles when they expected it to be rejected; it prints overwritten data, or crashes under AddressSanitizer. The open issue is labeled an unsound, high-priority bug. Another contributor says a related example has produced crashes or printed freed memory since Rust 1.4.

Combined views

—

First seen 10m ago

— likes— comments— saves— reposts

Combined views

—

First seen 10m ago

— likes— comments— saves— reposts

Sentiment

Positive——Negative

Summary

Not enough discussion yet.

No sentiment analysis available yet.

Sentiment

Positive——Negative

Summary

Not enough discussion yet.

No sentiment analysis available yet.

1 Source

GitHubstruct's lifetime requirements can be bypassed via covariant field assignment · Issue #164250 · rust-lang/rust
    • Home
    • Technology
    • Gaming
    • Entertainment
    • World & Business
    • Science
    • Sports
    • AI

    1 Source

    GitHubstruct's lifetime requirements can be bypassed via covariant field assignment · Issue #164250 · rust-lang/rust
    Today's Rank

    —

    Not ranked yet

    Today's Rank

    —

    Not ranked yet