Bug 545769 - [console] UTF-8 content read or send to process can be corrupted
Summary: [console] UTF-8 content read or send to process can be corrupted
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.12 M3   Edit
Assignee: Paul Pazderski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 266658 513424 (view as bug list)
Depends on: 546641 550345
Blocks: 552030
  Show dependency tree
 
Reported: 2019-03-25 20:08 EDT by Paul Pazderski CLA
Modified: 2020-06-27 09:31 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pazderski CLA 2019-03-25 20:08:20 EDT
The ProcessConsole can in some cases corrupt the content read or send to the processes standard IO streams.

How to reproduce:
 - In console with UTF8 encoding run the following snippet.
============
import java.util.Collections;
public class Umlaut {
	public static void main(String[] args) {
		String out = ">" + String.join("", Collections.nCopies(4200, "\u00F6"));
		System.out.print(out);
	}
}
============

You should see that an 'ΓΆ' is missing near the end and instead two replacement characters shown.
Comment 1 Eclipse Genie CLA 2019-03-25 20:11:53 EDT
New Gerrit change created: https://git.eclipse.org/r/139464
Comment 2 Paul Pazderski CLA 2019-03-25 20:12:23 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/139464

The patch depends on bug 307309 because the InputStreamReader has problems using the IOConsoleInputStream.
Comment 3 Eclipse Genie CLA 2019-03-25 20:14:07 EDT
New Gerrit change created: https://git.eclipse.org/r/139465
Comment 4 Paul Pazderski CLA 2019-03-25 20:14:56 EDT
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/139465

I finished this test case for JDT suite first and won't throw away my work even after I created a similar test for Platform test suite.
Comment 5 Sarika Sinha CLA 2019-03-25 22:53:25 EDT
@Andrey,
Will you be able to review this?
Comment 6 Andrey Loskutov CLA 2019-03-27 09:00:28 EDT
(In reply to Sarika Sinha from comment #5)
> @Andrey,
> Will you be able to review this?

In theory yes, but right now I'm pretty loaded. I will put it on our internal task list, just after the task to review the patch for bug 544970 :-).
Comment 7 Sarika Sinha CLA 2019-04-05 01:19:43 EDT
Thanks Andrey, Moving to M3 !
Comment 9 Sarika Sinha CLA 2019-05-21 01:25:47 EDT
@Paul!
Can you please verify this bug with latest I build ?
Comment 10 Paul Pazderski CLA 2019-05-21 03:51:40 EDT
Verified using Build id: I20190520-1805
Comment 12 Paul Pazderski CLA 2019-11-22 07:44:24 EST
*** Bug 266658 has been marked as a duplicate of this bug. ***
Comment 13 Paul Pazderski CLA 2020-06-27 09:31:39 EDT
*** Bug 513424 has been marked as a duplicate of this bug. ***