Project

General

Profile

Actions

Bug #1228

open

calling seek to beginning after seek to ns from origin

Added by Simon Marchi almost 5 years ago. Updated almost 5 years 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.

Actions #1

Updated by Jonathan Rajotte Julien almost 5 years 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.

Actions #2

Updated by Jonathan Rajotte Julien almost 5 years ago

  • Author changed from 215 to 8
Actions #3

Updated by Jonathan Rajotte Julien almost 5 years ago

Migrated from internal bug tracker.

Actions

Also available in: Atom PDF