Skip to content
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

build(windows): add some flags for windows build #15

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssssota
Copy link
Contributor

@ssssota ssssota commented Jan 28, 2025

close #1

@ssssota
Copy link
Contributor Author

ssssota commented Jan 28, 2025

build successful, test failed 😭

@ssssota
Copy link
Contributor Author

ssssota commented Jan 28, 2025

debug_assert!(!unsafe { (*processor.inner).rawdata.raw_alloc }.is_null());

failed on this assertion

@paolobarbolini
Copy link
Owner

Thanks for spending time on this!

debug_assert!(!unsafe { (*processor.inner).rawdata.raw_alloc }.is_null());

failed on this assertion

It looks like that's a null pointer, which the assert is checking to avoid dereferencing it later and causing unsoundness.

@ssssota
Copy link
Contributor Author

ssssota commented Jan 28, 2025

If comment out it, unittest will be successful on my local environment.

cargo test result

❯ cargo test
   Compiling libraw-rs v0.0.4 (D:\Dev\ghq\github.com\ssssota\libraw-rs\libraw)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.21s
     Running unittests src\lib.rs (target\debug\deps\libraw-d357620fbe82bc65.exe)

running 1 test
test utils::tests::list_cameras ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests\samples_decode.rs (target\debug\deps\samples_decode-eee351e6491c8ece.exe)

running 4 tests
test colorchart_iphone7plus_cloudy ... ok
test colorchart_5d2_6000k ... ok
test colorchart_eos_7d ... ok
test komainu ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.44s

     Running tests\samples_process.rs (target\debug\deps\samples_process-6d599789e54382bb.exe)

running 8 tests
test process_8bit::colorchart_iphone7plus_cloudy ... ok
test process_16bit::colorchart_iphone7plus_cloudy ... ok
test process_8bit::colorchart_eos_7d ... ok
test process_16bit::colorchart_eos_7d ... ok
test process_16bit::colorchart_5d2_6000k ... ok
test process_8bit::colorchart_5d2_6000k ... ok
test process_8bit::komainu ... ok
test process_16bit::komainu ... ok

test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 17.66s

     Running unittests src\lib.rs (target\debug\deps\libraw_sys-f8d8e58a6c6c510e.exe)

running 97 tests
test bindings::bindgen_test_layout__IO_cookie_io_functions_t ... ok
test bindings::bindgen_test_layout__IO_FILE ... FAILED
test bindings::bindgen_test_layout__G_fpos64_t ... FAILED
test bindings::bindgen_test_layout__G_fpos_t ... FAILED
test bindings::bindgen_test_layout___locale_struct ... ok
test bindings::bindgen_test_layout___atomic_wide_counter__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___mbstate_t__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout___mbstate_t ... ok
test bindings::bindgen_test_layout___once_flag ... ok
test bindings::bindgen_test_layout___atomic_wide_counter ... ok
test bindings::bindgen_test_layout___pthread_cond_s ... ok
test bindings::bindgen_test_layout___fsid_t ... ok
test bindings::bindgen_test_layout___pthread_internal_list ... ok
test bindings::bindgen_test_layout___pthread_internal_slist ... ok
test bindings::bindgen_test_layout___pthread_mutex_s ... ok
test bindings::bindgen_test_layout___pthread_rwlock_arch_t ... FAILED
test bindings::bindgen_test_layout___sigset_t ... FAILED
test bindings::bindgen_test_layout___va_list_tag ... ok
test bindings::bindgen_test_layout_crx_data_header_t ... ok
test bindings::bindgen_test_layout_crx_sample_to_chunk_t ... ok
test bindings::bindgen_test_layout_decode ... ok
test bindings::bindgen_test_layout_div_t ... ok
test bindings::bindgen_test_layout_drand48_data ... ok
test bindings::bindgen_test_layout_fd_set ... FAILED
test bindings::bindgen_test_layout_fuji_compressed_params ... ok
test bindings::bindgen_test_layout_fuji_q_table ... ok
test bindings::bindgen_test_layout_identify_data_t ... ok
test bindings::bindgen_test_layout_imaxdiv_t ... FAILED
test bindings::bindgen_test_layout_internal_data_t ... ok
test bindings::bindgen_test_layout_itimerval ... FAILED
test bindings::bindgen_test_layout_jhead ... ok
test bindings::bindgen_test_layout_ldiv_t ... FAILED
test bindings::bindgen_test_layout_libraw_P1_color_t ... ok
test bindings::bindgen_test_layout_libraw_afinfo_item_t ... ok
test bindings::bindgen_test_layout_libraw_area_t ... ok
test bindings::bindgen_test_layout_libraw_callbacks_t ... ok
test bindings::bindgen_test_layout_libraw_canon_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_colordata_t ... FAILED
test bindings::bindgen_test_layout_libraw_custom_camera_t ... ok
test bindings::bindgen_test_layout_libraw_data_t ... FAILED
test bindings::bindgen_test_layout_libraw_decoder_info_t ... ok
test bindings::bindgen_test_layout_libraw_dng_color_t ... ok
test bindings::bindgen_test_layout_libraw_dng_levels_t ... ok
test bindings::bindgen_test_layout_libraw_dnglens_t ... ok
test bindings::bindgen_test_layout_libraw_fuji_info_t ... ok
test bindings::bindgen_test_layout_libraw_gps_info_t ... ok
test bindings::bindgen_test_layout_libraw_hasselblad_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_image_sizes_t ... ok
test bindings::bindgen_test_layout_libraw_imgother_t ... FAILED
test bindings::bindgen_test_layout_libraw_internal_data_t ... ok
test bindings::bindgen_test_layout_libraw_internal_output_params_t ... ok
test bindings::bindgen_test_layout_libraw_iparams_t ... ok
test bindings::bindgen_test_layout_libraw_kodak_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_lensinfo_t ... ok
test bindings::bindgen_test_layout_libraw_makernotes_lens_t ... ok
test bindings::bindgen_test_layout_libraw_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_metadata_common_t ... ok
test bindings::bindgen_test_layout_libraw_nikon_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_nikonlens_t ... ok
test bindings::bindgen_test_layout_libraw_olympus_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_output_params_t ... ok
test bindings::bindgen_test_layout_libraw_p1_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_panasonic_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_pentax_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_processed_image_t ... ok
test bindings::bindgen_test_layout_libraw_raw_inset_crop_t ... ok
test bindings::bindgen_test_layout_libraw_raw_unpack_params_t ... ok
test bindings::bindgen_test_layout_libraw_rawdata_t ... FAILED
test bindings::bindgen_test_layout_libraw_ricoh_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_samsung_makernotes_t ... ok
test bindings::bindgen_test_layout_libraw_sensor_highspeed_crop_t ... ok
test bindings::bindgen_test_layout_libraw_shootinginfo_t ... ok
test bindings::bindgen_test_layout_libraw_sony_info_t ... ok
test bindings::bindgen_test_layout_libraw_thumbnail_item_t ... ok
test bindings::bindgen_test_layout_libraw_thumbnail_list_t ... ok
test bindings::bindgen_test_layout_libraw_thumbnail_t ... ok
test bindings::bindgen_test_layout_libraw_tiff_tag ... ok
test bindings::bindgen_test_layout_libraw_tiff_tag__bindgen_ty_1 ... ok
test bindings::bindgen_test_layout_lldiv_t ... ok
test bindings::bindgen_test_layout_output_data_t ... ok
test bindings::bindgen_test_layout_ph1_t ... ok
test bindings::bindgen_test_layout_pthread_attr_t ... FAILED
test bindings::bindgen_test_layout_pthread_barrier_t ... FAILED
test bindings::bindgen_test_layout_pthread_barrierattr_t ... ok
test bindings::bindgen_test_layout_pthread_cond_t ... ok
test bindings::bindgen_test_layout_pthread_condattr_t ... ok
test bindings::bindgen_test_layout_pthread_mutex_t ... ok
test bindings::bindgen_test_layout_pthread_mutexattr_t ... ok
test bindings::bindgen_test_layout_pthread_rwlock_t ... FAILED
test bindings::bindgen_test_layout_pthread_rwlockattr_t ... FAILED
test bindings::bindgen_test_layout_random_data ... ok
test bindings::bindgen_test_layout_tiff_hdr ... ok
test bindings::bindgen_test_layout_tiff_ifd_t ... ok
test bindings::bindgen_test_layout_timespec ... FAILED
test bindings::bindgen_test_layout_timeval ... FAILED
test bindings::bindgen_test_layout_timezone ... ok
test bindings::bindgen_test_layout_unpacker_data_t ... ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows support
2 participants