Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Issue 555943003: ARM: Do not stack allocate big buffers in Assembler. (Closed)

Created:
6 years, 3 months ago by ulan
Modified:
6 years, 3 months ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

ARM: Do not stack allocate big buffers in Assembler. Currently Assembler stack allocates 120KB for pending reloc infos. This can lead to stack-overflow in C++ since the stack guard limit is only 40K smaller than the stack size. BUG=405338 LOG=Y

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -4 lines) Patch
M src/arm/assembler-arm.h View 1 chunk +4 lines, -2 lines 0 comments Download
M src/arm/assembler-arm.cc View 2 chunks +10 lines, -2 lines 1 comment Download

Messages

Total messages: 10 (2 generated)
ulan
Hi Ross, Rodolph. Could you please take a look? This fixes chrome crashes. Another solution ...
6 years, 3 months ago (2014-09-18 12:52:42 UTC) #2
rmcilroy
On 2014/09/18 12:52:42, ulan wrote: > Hi Ross, Rodolph. > > Could you please take ...
6 years, 3 months ago (2014-09-18 13:02:03 UTC) #3
ulan
On 2014/09/18 13:02:03, rmcilroy wrote: > On 2014/09/18 12:52:42, ulan wrote: > > Hi Ross, ...
6 years, 3 months ago (2014-09-18 13:36:27 UTC) #4
Sven Panne
On 2014/09/18 13:02:03, rmcilroy wrote: > This seems fine to me, but I would just ...
6 years, 3 months ago (2014-09-18 13:48:22 UTC) #5
rmcilroy
On 2014/09/18 13:48:22, Sven Panne wrote: > On 2014/09/18 13:02:03, rmcilroy wrote: > > This ...
6 years, 3 months ago (2014-09-18 14:02:25 UTC) #6
Rodolph Perfetta
Relocinfo contains more info than is necessary for literal pools, so using a dedicated structure ...
6 years, 3 months ago (2014-09-18 14:03:25 UTC) #8
Rodolph Perfetta
On 2014/09/18 14:03:25, Rodolph Perfetta wrote: > Relocinfo contains more info than is necessary for ...
6 years, 3 months ago (2014-09-19 08:38:59 UTC) #9
ulan
6 years, 3 months ago (2014-09-19 09:39:07 UTC) #10
On 2014/09/19 08:38:59, Rodolph Perfetta wrote:
> On 2014/09/18 14:03:25, Rodolph Perfetta wrote:
> > Relocinfo contains more info than is necessary for literal pools, so using a
> > dedicated structure (like in arm64) would also save space. That being said
it
> is
> > only worth doing if the inline pool remains supproted.
> > 
> > https://codereview.chromium.org/555943003/diff/1/src/arm/assembler-arm.cc
> > File src/arm/assembler-arm.cc (right):
> > 
> >
>
https://codereview.chromium.org/555943003/diff/1/src/arm/assembler-arm.cc#new...
> > src/arm/assembler-arm.cc:477: max_num_32_bit_reloc_info_ =
> > This may not work. kMaxNumPending[32|64]RelocInfo were define as
> > LiteralPoolRange / InstructionSize so that you never need to check if you
are
> > going to overflow the array of RelocInfo since the pool will be emitted
before
> > that happens. There is no such guarantee now. And if buffer_size_ is bigger
> than
> > 4k then we are wasting space.
> 
> OK scratch that, I missed the Min ...
> 
> Sorry

After offline discussions, I am inclined to go with adjusting the stack limit.
That would be safer to merge back to 3.28 and wouldn't introduce new performance
regressions: https://codereview.chromium.org/583163002/

If you agree, I'll abandon this CL.

Powered by Google App Engine
This is Rietveld 408576698