Last Comment Bug 710980 - Array overrun in intl/chardet/tests/DetectCharset.cpp
: Array overrun in intl/chardet/tests/DetectCharset.cpp
Status: RESOLVED FIXED
[pvs-studio]
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: All Windows 7
: -- normal (vote)
: mozilla11
Assigned To: Simon Montagu :smontagu
:
: Makoto Kato [:m_kato]
Mentors:
: 710982 (view as bug list)
Depends on:
Blocks: 710966
  Show dependency treegraph
 
Reported: 2011-12-14 23:01 PST by Mike Hommey [:glandium]
Modified: 2011-12-20 05:17 PST (History)
2 users (show)
smontagu: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
remove it (13.41 KB, patch)
2011-12-15 23:29 PST, Simon Montagu :smontagu
no flags Details | Diff | Splinter Review
Patch v.2 (14.35 KB, patch)
2011-12-16 00:17 PST, Simon Montagu :smontagu
VYV03354: review+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2011-12-14 23:01:32 PST
The problematic code is the following:
class nsBaseStatis : public nsStatis {
public:
  ...
  PRUint32 mLWordLen[10]; 
  ...
  nsBaseStatis::nsBaseStatis(...)
  {
    ...
    for(PRUint32 i = 0; i < 20; i++)
       mLWordLen[i] = 0;
    ...
  }
  ...
};

Now, there are a few interesting things to note about this:
- This code is in a testcase
- The nsBaseStatis class is never used
- The test is only built on Windows
- AFAICS, the test is actually never run

Considering the above, I'm tempted to say the solution is rm -rf intl/chardet/tests.
Comment 1 Justin Dolske [:Dolske] 2011-12-14 23:06:53 PST
*** Bug 710982 has been marked as a duplicate of this bug. ***
Comment 2 Simon Montagu :smontagu 2011-12-15 23:28:35 PST
(In reply to Mike Hommey [:glandium] from comment #0)
> Considering the above, I'm tempted to say the solution is rm -rf
> intl/chardet/tests.

I agree with this, especially since intl/chardet has been almost entirely superseded by extensions/universalchardet.
Comment 3 Simon Montagu :smontagu 2011-12-15 23:29:40 PST
Created attachment 582188 [details] [diff] [review]
remove it
Comment 4 Mike Hommey [:glandium] 2011-12-16 00:10:43 PST
You need to modify intl/chardet/Makefile.in as well.
Comment 5 Simon Montagu :smontagu 2011-12-16 00:17:57 PST
Created attachment 582193 [details] [diff] [review]
Patch v.2
Comment 6 Masatoshi Kimura [:emk] 2011-12-16 04:18:34 PST
> I agree with this, especially since intl/chardet has been almost entirely
> superseded by extensions/universalchardet.
Is it possible to remove intl/chardet entirely?
It will steer Win PGO builds away from the 3GB virtual address space limit a bit.
Comment 7 Masatoshi Kimura [:emk] 2011-12-16 04:20:48 PST
Comment on attachment 582193 [details] [diff] [review]
Patch v.2

r=me anyway.
Comment 8 Simon Montagu :smontagu 2011-12-17 20:47:08 PST
(In reply to Masatoshi Kimura [:emk] from comment #6)
> Is it possible to remove intl/chardet entirely?

Filed bug 711790
Comment 10 Ed Morley [:emorley] 2011-12-20 05:17:17 PST
https://hg.mozilla.org/mozilla-central/rev/28cd0159472e

Note You need to log in before you can comment on or make changes to this bug.