onnxruntime/onnxruntime/test/framework
Edward Chen d5338da1f5
Fix tensor external data info length parsing issue. (#23526)
Fix tensor external data info length parsing issue.

The old implementation was parsing a `size_t` value with `strtol` (via `OrtStrToPtrDiff`) on ARM64 MSVC.

bf023ab3d5/onnxruntime/core/platform/path_lib.h (L74)

If we have `sizeof(size_t) == 8` and `sizeof(long) == 4` (as is the case for x64 and ARM64 MSVC), `strtol` will return a maximum value of `2^31-1` even for a larger, valid `size_t` value. `strtol` will also set `errno` to `ERANGE`, but we weren't checking that.

Updated to use `ParseStringWithClassicLocale` which will parse directly to the target type.

Added some tests.
2025-01-29 13:35:25 -08:00
..
cuda Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
allocation_planner_test.cc Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
allocator_test.cc Simplify CPU allocator arena usage helper function, fix unit tests that check old ifdefs. (#22876) 2024-11-19 14:24:52 -08:00
bfc_arena_test.cc Disable streams for the DML EP (#19481) 2024-02-10 00:34:34 -08:00
copy_test.cc
data_types_test.cc Add numeric_limits for float8 types (#22228) 2024-09-26 14:42:36 -07:00
distance_test.cc
dummy_allocator.cc
dummy_allocator.h
dummy_provider.cc
dummy_provider.h
endian_test.cc
execution_frame_test.cc Introduce custom external data loader (#21634) 2024-08-27 12:18:52 -07:00
execution_provider_test.cc ExecutionProvider API refactor - make GenerateMetaDefId a standalone function, decouple it from EP (#18977) 2024-01-26 07:39:08 -08:00
float_8_test.cc near-zero negative values must convert to 0 not NAN (#18473) 2024-09-06 11:41:48 -07:00
float_16_test.cc [C#, CPP] Introduce Float16/BFloat16 support and tests for C#, C++ (#16506) 2023-07-14 10:46:52 -07:00
function_test.cc Cleanup code (#22827) 2024-11-19 14:13:33 -08:00
inference_session_test.cc Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
insert_cast_transformer_test.cc Fix typos - 1st Wave (#21278) 2024-07-11 13:35:08 +08:00
kernel_registry_test.cc
kernel_type_str_resolver_utils_test.cc Update absl and gtest to fix an ARM64EC build error (#18735) 2023-12-07 15:55:17 -08:00
local_kernel_registry_test.cc
math_test.cc Fix Mac M1 build (#16763) 2023-07-20 18:24:57 -07:00
mem_pattern_planner_test.cc
memcpy_transformer_test.cc Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
model_builder_utils.h
opaque_kernels_test.cc
ort_model_only_test.cc Two fixes involving minimal builds (#17000) 2023-08-23 16:01:22 +10:00
parallel_executor_test.cc
provider_options_utils_test.cc
random_test.cc
save_model_with_external_initializers.cc Implement pre-packed blobs serialization on disk and their memory mapping on load (#23069) 2024-12-20 10:49:08 -08:00
session_state_test.cc Implement pre-packed blobs serialization on disk and their memory mapping on load (#23069) 2024-12-20 10:49:08 -08:00
shape_inference_test.cc Implement CustomOp Output Type Inference function (#19906) 2024-03-18 10:28:39 -07:00
sparse_kernels_test.cc Revert DML pipeline changes (#23135) 2024-12-18 10:42:10 -08:00
tensor_shape_test.cc
tensor_test.cc Simplify CPU allocator arena usage helper function, fix unit tests that check old ifdefs. (#22876) 2024-11-19 14:24:52 -08:00
tensorutils_test.cc Fix tensor external data info length parsing issue. (#23526) 2025-01-29 13:35:25 -08:00
test_tensor_loader.cc Enablement of onnxruntime for AIX and fixing issues related to big-endian platform. (#21133) 2024-07-17 12:37:06 -07:00
test_utils.cc
test_utils.h Remove core/common/gsl.h (#20894) 2024-07-08 18:09:39 -07:00
TestAllocatorManager.cc remove AllocatorMgr class (#16509) 2023-06-28 15:43:19 -07:00
TestAllocatorManager.h
transpose_test.cc
tunable_op_test.cc Fix typos according to reviewdog report. (#21335) 2024-07-22 13:37:32 -07:00
type_info_test.cc