Project

General

Profile

Bug #1228

calling seek to beginning after seek to ns from origin

Added by Simon Marchi 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
libbabeltrace2
Start date:
02/17/2020
Due date:
% Done:

0%

Estimated time:

Description

I haven't tried, but from my understanding of the message iterator, this sequence should trigger a bug:

1. seek an iterator to some ns_from_origin. It uses auto seek, therefore buffers some messages in the auto seek queue and replaces the next method with post_auto_seek_next.
2. seek an iterator to the beginning.
3. Consume some messages

Even though we have seeked to beginning, the post_auto_seek_next callback is still installed, and will returned the messages from 1. The caller would expect the messages from the beginning to be returned.

There might be other cases like this were the auto seek state should be trashed but isn't.

#1

Updated by Jonathan Rajotte Julien 7 months ago

Follow-up:

From Jonathan Rajotte:

A possible solution to this would be that on seek begin to ensure that the "next" called function is the correct one.

#2

Updated by Jonathan Rajotte Julien 7 months ago

  • Author changed from 215 to 8
#3

Updated by Jonathan Rajotte Julien 7 months ago

Migrated from internal bug tracker.

Also available in: Atom PDF