Skip to content

panic: index out of bounds: the len is 2 but the index is 2 (thread Script#1, at /home/runner/.cargo/git/checkouts/stylo-482338307e42a9ea/f611007/style/servo/animation.rs:359) #45008

Closed

Description

@fred-wang

Minimal testcase. It is flaky, I'm using https://github.com/fred-wang/servo-fuzzing/blob/main/repeat.sh to repeat several times.

<!DOCTYPE html>
<style>
  div {
      -webkit-animation-iteration-count: infinite;
      -webkit-animation-delay: -2s;
      -webkit-animation-duration: .5s;
      animation-name: keyframes2
  }
  @keyframes keyframes2 {
      0%{ border-left-color: rgb(6,5,2); }
  }
</style>
<div></div>

System: Linux
Version: Version: Servo 0.2.0-6902b4023
Command: ./repeat.sh ./servo/servoshell

index out of bounds: the len is 2 but the index is 2 (thread Script#1, at /home/runner/.cargo/git/checkouts/stylo-482338307e42a9ea/f611007/style/servo/animation.rs:359)
   0: servoshell::backtrace::print
   1: servoshell::panic_hook::panic_hook
   2: std::panicking::panic_with_hook
   3: std::panicking::panic_handler::{closure#0}
   4: std::sys::backtrace::__rust_end_short_backtrace::<std::panicking::panic_handler::{closure#0}, !>
   5: __rustc::rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::panicking::panic_bounds_check
   8: style::servo::animation::Animation::next_relevant_keyframe_for_property_in_direction
   9: style::servo::animation::ElementAnimationSet::get_value_map_for_active_animations
  10: style::servo::animation::DocumentAnimationSet::get_all_declarations
  11: style::parallel::style_trees
  12: style::driver::traverse_dom::{{closure}}
  13: layout::layout_impl::LayoutThread::handle_reflow
  14: <layout::layout_impl::LayoutThread as layout_api::Layout>::reflow
  15: <script::dom::window::Window>::reflow
  16: <script::dom::document::document::Document>::update_the_rendering
  17: <script::dom::window::Window>::allow_layout_if_necessary
  18: <script::dom::document::document::Document>::finish_load
  19: <script::dom::servoparser::ServoParser>::parse_sync
  20: <script::dom::servoparser::ParserContext as script::network_listener::FetchResponseListener>::process_response_eof
  21: <script::script_thread::ScriptThread>::handle_msg_from_script
  22: <script::script_thread::ScriptThread>::handle_msgs::{closure#2}
  23: <script::script_thread::ScriptThread>::handle_msgs
  24: std::sys::backtrace::__rust_begin_short_backtrace::<<script::script_thread::ScriptThread as layout_api::ScriptThreadFactory>::create::{closure#0}, ()>
  25: <std::thread::lifecycle::spawn_unchecked<<script::script_thread::ScriptThread as layout_api::ScriptThreadFactory>::create::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  26: <std::sys::thread::unix::Thread>::new::thread_start
  27: start_thread
             at ./nptl/pthread_create.c:447:8
  28: clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0

Activity

  1. added
    C-untriaged
    on May 19, 2026
  2. added
    C-has-manual-testcase
    I-panic
    and removed
    C-untriaged
    on May 19, 2026
  3. added a commit that references this issue on Jun 15, 2026
    a62dccb
  4. added a commit that references this issue on Jun 21, 2026
    41dbe1f
  5. added
    B-fuzzing
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layout/animationsB-fuzzingC-has-manual-testcaseI-panic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions