DESCRIPTION

ctf: add out of memory detection for sequences

Change-Id: If4b1a14bf135da3fae9f356631440acede56673c
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2013-11-27 20:10:47.000000000

Patch Set 1: Code-Review-1

This is way too implementation-specific. This look like a bandaid for a specific test case. This check could be done, but at a lower-level read() method that would apply to any type.

-------------------------------------
author: Ivy Mitchell
date: 2013-11-27 20:16:07.000000000

Patch Set 1:

I agree with your assessment, but sequences are the only "data-defined" data types, so it's the largest flaw to be fixed. I could do it for every new, but this is where it will occur the most. 

I have experienced this bug often when I had alignment issues. The problem was when we would be off by n, the size of the sequence would be expanded by 2^n. It is the only data type to have that issue.

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-27 20:23:03.000000000

Patch Set 1:

OutOfMemoryError seems like something very bad that we should not even let happen. We could hard-code a "reasonable" limit for sequences, and if a trace tries to allocate bigger than that we don't let it do it. Then we could document our implementation has this limitation (which is not unreasonable).

An analogy could be that the C language spec allows for infinite nested parenthesis, but GCC actually limits it to a couple thousands "only" ;)

-------------------------------------
author: Brenden Conley
date: 2013-11-27 22:11:01.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4230/

-------------------------------------
author: Brenden Conley
date: 2013-11-27 22:32:41.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4230/ : ABORTED

-------------------------------------
