New issue
Advanced search Search tips

Issue 663326 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature

Blocking:
issue 663324



Sign in to add a comment

Difference between fullcode and ignition_staging_turbo_opt: isOneByteString

Project Member Reported by machenb...@chromium.org, Nov 8 2016

Issue description

Requires --expose-externalize-string. Maybe connected to issue 662406.

# Minimized program:
print(isOneByteString("123456789" + "qwertyuiopasdfghjklzxcvbnm"));

# Compared fullcode with ignition_turbo_opt

# Flags of fullcode:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --expose-externalize-string --random-seed 1635110516 --nocrankshaft --turbo-filter=~
# Flags of ignition_turbo_opt:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --expose-externalize-string --random-seed 1635110516 --ignition-staging --turbo --always-opt

Difference:
- true
+ false

### Start of configuration fullcode:
true

### End of configuration fullcode

### Start of configuration ignition_turbo_opt:
false

### End of configuration ignition_turbo_opt
 
Labels: Proj-Ignition
Cc: mythria@chromium.org leszeks@chromium.org
This also only occurs when --turbo and --always-opt are passed, so looks like a turbofan ends up creating something which is not a isOneByteString .
Owner: mythria@chromium.org
Status: Assigned (was: Untriaged)
I noticed that string add is optimized differently in turbofan and crankshaft. Crankshaft inlines few of the cases without calling to the StringAdd stub. I will take a look at this.
Labels: -Type-Bug -Pri-2 -Proj-Ignition Proj-TurboFan OS-All Pri-3 Type-Feature
Owner: bmeu...@chromium.org
This is my TODO in JSTypedLowering, where we always use the cons_string_map, w/o checking whether we could produce a one-byte string instead. This is not a correctness issue tho.
Labels: -Restrict-View-Google v8-foozzie-failure
Labels: v8-foozzie-legacy
Did this get fixed in the mean time? The original report doesn't repro anymore with ToT and this is one of the legacy cases from the fuzzer evaluation phase.

If it's supposed to still repro, do you have an actual one?
TurboFan probably constant-folds the string addition by now. So using non constant one byte string on one side should still repro. 
Indeed, still repros. Still requires --expose-externalize-string.

function f(a) {
  print(isOneByteString(a + "qwertyuiopasdfghjklzxcvbnm"))
}
f("12345");
f("12345");
%OptimizeFunctionOnNextCall(f)
f("12345");

// Output:
# Compared x64,ignition with x64,ignition_turbo
#
# Flags of x64,ignition:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --expose-externalize-string --random-seed 732681078 --ignition --turbo-filter=~ --hydrogen-filter=~ --nocrankshaft
# Flags of x64,ignition_turbo:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --expose-externalize-string --random-seed 732681078 --ignition --turbo
#
# Difference:
- true
+ false
#
# Source file:
none
#
### Start of configuration x64,ignition:
true
true
true

### End of configuration x64,ignition
#
### Start of configuration x64,ignition_turbo:
true
true
false

### End of configuration x64,ignition_turbo

Components: Blink>JavaScript>Compiler
Status: Fixed (was: Assigned)
This was fixed recently with https://chromium-review.googlesource.com/799700

Sign in to add a comment