Skip to content

Bugfix: move construct an empty fast_io::list#1219

Merged
trcrsired merged 2 commits intocppfastio:nextfrom
SekaiArendelle:bugfix-move-list
Nov 16, 2025
Merged

Bugfix: move construct an empty fast_io::list#1219
trcrsired merged 2 commits intocppfastio:nextfrom
SekaiArendelle:bugfix-move-list

Conversation

@SekaiArendelle
Copy link

  • before this patch, the list_move.cc#L10 will crash

Following information comes from GDB to prove why the move constructor before this patch is wrong:

gef➤  p result
$6 = {
  static alloc_with_status = 0x0,
  allochdl = {
    value = {
      static has_status = 0x0
    }
  },
  imp = {
    prev = 0x7fffffffd528,
    next = 0x7fffffffd528
  }
}
gef➤  p &result
$7 = (pltxt2htm::details::MdListAst *) 0x7fffffffd528


gef➤  p call_stack.top().result
$8 = {
  static alloc_with_status = 0x0,
  allochdl = {
    value = {
      static has_status = 0x0
    }
  },
  imp = {
    prev = 0x7fffffffd528,
    next = 0x7fffffffd528
  }
}
gef➤  p &call_stack.top().result
$9 = (pltxt2htm::details::MdListAst *) 0x55555556f548 // Mistake here

- before this patch, the list_move.cc#L10 will crash
@trcrsired
Copy link
Member

use is_empty() instead. thanks

@SekaiArendelle
Copy link
Author

@trcrsired Done

@trcrsired trcrsired merged commit 427890f into cppfastio:next Nov 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants