-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int fields in bootstrap classes are not initialized properly #2237
Comments
Instance field initializers are parsed when a constructor is compiled but some of the internal VM objects like OneByteString, TwoByteString etc. do not run any dart constructors but instead just call into the VM to create these objects. Your example violates the contract we have for implementing Strings as internal VM objects (the dart and internal VM layout does not match). You could change your code and use static fields: |
Changed the title to: "int fields in bootstrap classes are not initialized properly". |
This issue is now superseded by issue #2280. http://code.google.com/p/dart/issues/detail?id=2280 Added Fixed label. |
Includes the following commits: 80ac76400ff58fde3c5a335d860d196c3febe837 Warn about authors field in pubspec.yaml 6b6e02fcdd8094ccbba919b2fdc74947b1cebb71 Warn about old flutter plugin registration format (#2233) 8308acbc48ebd4da4ab7f45169af8dee4df18e79 Language versioning b18d4f6a5d035f4f72ef187e9cdb133d18848c2d update doc 408bdd58ab01689fd82cc036b4142f7b592b4ba0 Added utility for faster local testing (#2235) 055fc19d2e06e819dbd47b3b56909c47bd893f66 Upgraded package:yaml to 2.2.0 (#2237) 0f3baf7abb13702f7fb1ff3709c584065df1435c Remove unused Map `availableVersions` cfa9dc760b6b601f9473e65d15f15b60a319336d Fix to show proper error message when git is not installed (#2209) d99b0d58f4059d7bb4ac4616fd3d54ec00a2b5d4 Rephrase warnings for missing deps (#2203) 76b8c30395b37f96d3db3e842344cc842bdd7c24 Don't mention 'transformed dependencies'. (#2199) 4bd65e0f54e6e4540f03467b0272a5666e8d54ba return the hashCode of the description (#2198) 92b52682e8fc6eed9ef2e77ed890647f75570165 Test more pre-release behavior. (#2175) 066ac118d406500f672339e25f0154af9321deac update to latest pkg:analyzer (#2172) 289804a5d2c9746b4e86c271c2abcfe17417e20f Minor typo fixed (#2166) Change-Id: I3922bcaacb5399853a291b92d7192d21f719d224 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123404 Reviewed-by: Jonas Jensen <jonasfj@google.com> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
…ctor, browser_launcher, cli_util, clock, collection, convert, crypto, csslib, dartdoc, ecosystem, ffi, fixnum, glob, html, http, http_multi_server, http_parser, json_rpc_2, lints, logging, markdown, matcher, mime, mockito, native, package_config, path, pool, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_descriptor, test_process, test_reflective_loader, tools, typed_data, usage, watcher, web_socket_channel, webdev, yaml, yaml_edit Revisions updated by `dart tools/rev_sdk_deps.dart`. args (https://github.com/dart-lang/args/compare/5a4e16f..df9b428): df9b428 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#256) 892f013 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#257) async (https://github.com/dart-lang/async/compare/75efa6c..def4482): def4482 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#253) a0ca552 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#252) bazel_worker (https://github.com/dart-lang/bazel_worker/compare/159e671..b1b6a66): b1b6a66 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#82) bb9e48d 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#81) benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/7d0d28e..59aea95): 59aea95 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#94) e3f6207 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#93) boolean_selector (https://github.com/dart-lang/boolean_selector/compare/f255921..9431e01): 9431e01 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#51) browser_launcher (https://github.com/dart-lang/browser_launcher/compare/1f69393..25bc94a): 25bc94a 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#50) cli_util (https://github.com/dart-lang/cli_util/compare/44118e3..9e48f0d): 9e48f0d 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#90) clock (https://github.com/dart-lang/clock/compare/1e75f08..200a020): 200a020 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#56) 8a2b550 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#57) collection (https://github.com/dart-lang/collection/compare/91afde4..d27bfaf): d27bfaf 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#314) 5d568ae 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#313) convert (https://github.com/dart-lang/convert/compare/c058c8f..140b2f0): 140b2f0 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#87) crypto (https://github.com/dart-lang/crypto/compare/1e26879..b38dd62): b38dd62 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#153) csslib (https://github.com/dart-lang/csslib/compare/bd30a1a..f6b68dd): f6b68dd 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#190) 4b1ee3f 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#189) dartdoc (https://github.com/dart-lang/dartdoc/compare/a3cfdc4..59947b1): 59947b14 2023-09-25 Sam Rawlins Do not hide stacktrace of DartdocFailures (#3505) d95af5c7 2023-09-25 dependabot[bot] Bump actions/checkout from 4.0.0 to 4.1.0 (#3506) ecosystem (https://github.com/dart-lang/ecosystem/compare/3da2dd3..dcbd2ee): dcbd2ee 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#184) 3006120 2023-10-01 dependabot[bot] Bump peter-evans/create-or-update-comment (#183) 69334aa 2023-10-01 dependabot[bot] Bump actions/upload-artifact (#181) 3dd6c69 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#185) 2c5523c 2023-10-01 dependabot[bot] Bump actions/cache from 3.3.1 to 3.3.2 (#182) 5b7d3fd 2023-09-28 Devon Carew update package:dart_flutter_team_lints to use the beta package:lints (#179) 297e63e 2023-09-28 Devon Carew fix an issue validating pre-release git publishing tags (#180) 1154183 2023-09-28 Moritz Check for `DO_NOT_SUBMIT` strings. (#178) bc2dd27 2023-09-28 Moritz Add api tool call for testing (#153) eb8e398 2023-09-27 Moritz Do not fail `publish` on forks (#177) f40a4eb 2023-09-25 Devon Carew improve support for '-dev' and '-wip' package versions (#173) ffi (https://github.com/dart-lang/ffi/compare/d36e05a..ee70dd4): ee70dd4 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#214) fixnum (https://github.com/dart-lang/fixnum/compare/87ed065..ef0a587): ef0a587 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#115) glob (https://github.com/dart-lang/glob/compare/9c1996f..0046533): 0046533 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#83) f6ebc74 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#84) html (https://github.com/dart-lang/html/compare/a1b193e..49e2c8e): 49e2c8e 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#228) fb2de8a 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#227) http (https://github.com/dart-lang/http/compare/1251619..88ec75e): 88ec75e 2023-10-01 dependabot[bot] Bump actions/checkout from 3 to 4 (#1025) 08143d1 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#1024) 2c99da1 2023-10-01 dependabot[bot] Bump actions/cache from 3.3.1 to 3.3.2 (#1023) http_multi_server (https://github.com/dart-lang/http_multi_server/compare/9d62ea3..03041aa): 03041aa 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#59) 5efaa07 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#58) http_parser (https://github.com/dart-lang/http_parser/compare/d2d03e7..c557f57): c557f57 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#78) a629fd6 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#79) json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/50a3786..0521afb): 0521afb 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#104) 4782145 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#103) lints (https://github.com/dart-lang/lints/compare/b044aca..140c802): 140c802 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#158) 624a09d 2023-09-28 Devon Carew add dangling_library_doc_comments, remove prefer_void_to_null (#157) 296efaf 2023-09-28 Devon Carew remove no_wildcard_variable_uses; improve testing (#156) c266a04 2023-09-26 Devon Carew rev to 3.0.0-beta in preparation for publishing (#153) logging (https://github.com/dart-lang/logging/compare/bcaad0f..642ed21): 642ed21 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#149) 287f4cb 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#148) markdown (https://github.com/dart-lang/markdown/compare/6cfd6f1..ae766d5): ae766d5 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#556) matcher (https://github.com/dart-lang/matcher/compare/80910d6..11daad9): 11daad9 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#229) mime (https://github.com/dart-lang/mime/compare/37ef637..f3b9c49): f3b9c49 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#105) mockito (https://github.com/dart-lang/mockito/compare/097e563..610c3dc): 610c3dc 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#699) 73930cd 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#698) native (https://github.com/dart-lang/native/compare/be4aaf7..22500ea): 22500ea 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#144) 5bfc7ff 2023-10-01 dependabot[bot] Bump coverallsapp/github-action from 2.2.1 to 2.2.3 (#145) 0b7885a 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#143) package_config (https://github.com/dart-lang/package_config/compare/ae7ad83..100533d): 100533d 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#141) a4b474a 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#142) path (https://github.com/dart-lang/path/compare/96d9183..abcf38c): abcf38c 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#151) pool (https://github.com/dart-lang/pool/compare/a5bee35..4bcc7de): 4bcc7de 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#75) pub_semver (https://github.com/dart-lang/pub_semver/compare/f0be74a..8e5a58f): 8e5a58f 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#93) 81da7c8 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#92) shelf (https://github.com/dart-lang/shelf/compare/4851978..c15fc6f): c15fc6f 2023-10-01 dependabot[bot] Bump actions/cache from 3.3.1 to 3.3.2 (#386) e47c00e 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#384) b9c898e 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#385) 9b96b9b 2023-09-26 Michael Thomsen Add backend tag in pubspec.yaml (#381) source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/196d7bf..73d449c): 73d449c 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#42) 2c4840e 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#43) source_maps (https://github.com/dart-lang/source_maps/compare/eb3d40a..fc6aa16): fc6aa16 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#83) dfca7d5 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#82) source_span (https://github.com/dart-lang/source_span/compare/48d0f57..92e50bf): 92e50bf 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#102) c212afa 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#103) sse (https://github.com/dart-lang/sse/compare/eeb2588..606387e): 606387e 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#89) stack_trace (https://github.com/dart-lang/stack_trace/compare/bcf2a0b..1c36cd7): 1c36cd7 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#143) stream_channel (https://github.com/dart-lang/stream_channel/compare/0ce7ab6..bf74065): bf74065 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#95) string_scanner (https://github.com/dart-lang/string_scanner/compare/da9142c..616424c): 616424c 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#63) term_glyph (https://github.com/dart-lang/term_glyph/compare/1b28285..19abf84): 19abf84 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#42) test (https://github.com/dart-lang/test/compare/8191a35..367aa39): 367aa397 2023-10-02 Jacob MacDonald release test_core and test (#2112) 672be9d7 2023-10-02 Ben Konyi Update package:vm_service to 12.0.0 (#2110) de324cc7 2023-10-01 dependabot[bot] Bump github/codeql-action from 2.21.5 to 2.21.9 (#2106) 31b94dbb 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#2105) d56c2150 2023-10-01 dependabot[bot] Bump actions/cache from 3.0.11 to 3.3.2 (#2108) b93f1b50 2023-10-01 dependabot[bot] Bump actions/upload-artifact from 3.1.2 to 3.1.3 (#2109) a077b673 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#2107) 566d70a2 2023-09-26 Lau Ching Jun Filter test by line when kernel is compiled with --filesystem-scheme. (#2101) 7ec1bbf5 2023-09-25 Nate Bosch Drop support for legacy iframe communication (#2099) d3f4b368 2023-09-25 Nate Bosch Tighten types in test utils (#2097) 9d997910 2023-09-25 Nate Bosch Add types to Browser implementation url arguments (#2096) test_descriptor (https://github.com/dart-lang/test_descriptor/compare/030193d..55b5eac): 55b5eac 2023-10-02 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#57) c2ba59e 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#56) test_process (https://github.com/dart-lang/test_process/compare/2a6ee23..5efd0bf): 5efd0bf 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#49) test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/45c57d6..8593eb1): 8593eb1 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#52) 4857e22 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#53) tools (https://github.com/dart-lang/tools/compare/3c248df..f318c80): f318c80 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#177) 0480655 2023-10-01 dependabot[bot] Bump coverallsapp/github-action from 2.2.1 to 2.2.3 (#176) 73583e8 2023-09-29 Devon Carew update package:cli_config to the latest package:dart_flutter_team_lints (#171) b293897 2023-09-28 Devon Carew update to the latest package:dart_flutter_team_lints (#173) 242fdb5 2023-09-28 Devon Carew update to the latest package:dart_flutter_team_lints (#172) a51f779 2023-09-28 Elias Yishak Use constant for no op client id (#168) e83caee 2023-09-27 Moritz Allow `publish` to write comments on forks (#169) typed_data (https://github.com/dart-lang/typed_data/compare/80e8943..d1c15ed): d1c15ed 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#73) e13af06 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#74) usage (https://github.com/dart-lang/usage/compare/7b12d51..d7d2964): d7d2964 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#198) 920c6e8 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#199) watcher (https://github.com/dart-lang/watcher/compare/1aed03e..c480e2d): c480e2d 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#151) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/af945f1..364013d): 364013d 2023-10-02 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#286) 50dada7 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#285) webdev (https://github.com/dart-lang/webdev/compare/3078f48..7c2c2d7): 7c2c2d70 2023-10-01 dependabot[bot] Bump actions/checkout from 3.2.0 to 4.1.0 (#2245) 7739a114 2023-09-26 Elliott Brooks Refactor tests to handle new `ToolConfiguration` (#2243) 4e350cde 2023-09-21 Elliott Brooks Fix issue with the inspector panel in the Dart Debug Extension (#2242) bbddba29 2023-09-21 Elliott Brooks Prepare the Dart Debug Extension for release to version 1.36 (#2241) cc5db13f 2023-09-21 Elliott Brooks Rename plainUri to debugUri and send it to the extension (#2238) 48fc725f 2023-09-20 Elliott Brooks Add a new workspaceName parameter to DWDS on start up (#2237) d2dae560 2023-09-20 Elliott Brooks Refactor: Update the parameters for `DWDS.start` (#2231) yaml (https://github.com/dart-lang/yaml/compare/ae00187..9f0d649): 9f0d649 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#153) 8e70ffb 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#152) yaml_edit (https://github.com/dart-lang/yaml_edit/compare/4a9734d..a7e7fba): a7e7fba 2023-10-01 dependabot[bot] Bump actions/checkout from 3.6.0 to 4.1.0 (#58) f33e3d0 2023-10-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#59) 8a380e8 2023-09-28 Sigurd Meldgaard Change AliasError to AliasException (#57) Change-Id: I22f88e36d2eceb03495dabcf1265e9043364e0bd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329260 Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
Add the following code to the StringBase class
final int MAGIC = (1 << 16) - 1;
final int MORE_MAGIC = (1 << 64) - 1;
void magic() {
print(MAGIC);
}
void moreMagic() {
print(MORE_MAGIC);
}
Create a .dart file with the following main function and run it
main() {
"".magic();
"".moreMagic();
Expect.equals((1 << 16) - 1, "".MAGIC);
Expect.equals((1 << 64) - 1, "".MORE_MAGIC);
}
One would expect the .magic call to print 65535 and the .moreMagic call to print 4294967295, and the two .expect calls to succeed. Instead, the first call prints 0, the second call prints 1, and the first expect fails.
I looked at the Smi printer in the debugger and the this value did not look like a tagged Smi.
The text was updated successfully, but these errors were encountered: