Skip to content

Commit c12514c

Browse files
committed
musl: time64: update {IPC,MSG,SEM}_STAT definitions
This is primarily based on a small part of bminor/musl@3814333. This also integrates bminor/musl@3c02bac, which update MSG_STAT, SEM_STAT, SEM_STAT_ANY. These are based on the value of IPC_STAT, however we can just use `cfg` as it is effectively the same.
1 parent fa412e5 commit c12514c

6 files changed

+156
-5
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:511:5:
2+
assertion `left == right` failed
3+
left: 0
4+
right: 1002111927320821928687967599834759150
5+
stack backtrace:
6+
0: 0x7f2b53559785 - <unknown>
7+
1: 0x7f2b535596d5 - std::backtrace::Backtrace::force_capture::hef0840345d34355a
8+
2: 0x7f2b50c9b1ce - <unknown>
9+
3: 0x7f2b53576833 - std::panicking::rust_panic_with_hook::h402df430f77b139b
10+
4: 0x7f2b5357650a - <unknown>
11+
5: 0x7f2b53573a89 - std::sys::backtrace::__rust_end_short_backtrace::hd6ee186b09085420
12+
6: 0x7f2b535761cf - rust_begin_unwind
13+
7: 0x7f2b4fd4e480 - core::panicking::panic_fmt::h250731373fbf7c0c
14+
8: 0x7f2b4fd4e8fa - core::panicking::assert_failed_inner::h0b63c78fb2eab9e0
15+
9: 0x7f2b51d88747 - core[1da3e9e537ec24d4]::panicking::assert_failed::<u128, u128>
16+
10: 0x7f2b51d6522c - <rustc_middle[d6b0322ea3151aaa]::query::on_disk_cache::OnDiskCache>::new
17+
11: 0x7f2b515dbd52 - rustc_incremental[539479ebccffad45]::persist::load::load_query_result_cache
18+
12: 0x7f2b50bc8a7b - <unknown>
19+
13: 0x7f2b50c7f596 - <unknown>
20+
14: 0x7f2b50c15a97 - <unknown>
21+
15: 0x7f2b50c30651 - std[6956e2ccddace8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_with_globals<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_pool_with_globals<rustc_interface[8bbda2bbdfb85682]::interface::run_compiler<(), rustc_driver_impl[a38dd6409c8212bc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22+
16: 0x7f2b50c32693 - <unknown>
23+
17: 0x7f2b5358212b - <unknown>
24+
25+
26+
rustc version: 1.86.0-nightly (05f9846f8 2025-03-31) (gentoo)
27+
platform: x86_64-unknown-linux-musl
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:511:5:
2+
assertion `left == right` failed
3+
left: 0
4+
right: 1002111927320821928687967599834759150
5+
stack backtrace:
6+
0: 0x7f6a67359785 - <unknown>
7+
1: 0x7f6a673596d5 - std::backtrace::Backtrace::force_capture::hef0840345d34355a
8+
2: 0x7f6a64a9b1ce - <unknown>
9+
3: 0x7f6a67376833 - std::panicking::rust_panic_with_hook::h402df430f77b139b
10+
4: 0x7f6a6737650a - <unknown>
11+
5: 0x7f6a67373a89 - std::sys::backtrace::__rust_end_short_backtrace::hd6ee186b09085420
12+
6: 0x7f6a673761cf - rust_begin_unwind
13+
7: 0x7f6a63b4e480 - core::panicking::panic_fmt::h250731373fbf7c0c
14+
8: 0x7f6a63b4e8fa - core::panicking::assert_failed_inner::h0b63c78fb2eab9e0
15+
9: 0x7f6a65b88747 - core[1da3e9e537ec24d4]::panicking::assert_failed::<u128, u128>
16+
10: 0x7f6a65b6522c - <rustc_middle[d6b0322ea3151aaa]::query::on_disk_cache::OnDiskCache>::new
17+
11: 0x7f6a653dbd52 - rustc_incremental[539479ebccffad45]::persist::load::load_query_result_cache
18+
12: 0x7f6a649c8a7b - <unknown>
19+
13: 0x7f6a64a7f596 - <unknown>
20+
14: 0x7f6a64a15a97 - <unknown>
21+
15: 0x7f6a64a30651 - std[6956e2ccddace8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_with_globals<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_pool_with_globals<rustc_interface[8bbda2bbdfb85682]::interface::run_compiler<(), rustc_driver_impl[a38dd6409c8212bc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22+
16: 0x7f6a64a32693 - <unknown>
23+
17: 0x7f6a6738212b - <unknown>
24+
25+
26+
rustc version: 1.86.0-nightly (05f9846f8 2025-03-31) (gentoo)
27+
platform: x86_64-unknown-linux-musl
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:511:5:
2+
assertion `left == right` failed
3+
left: 0
4+
right: 1002111927320821928687967599834759150
5+
stack backtrace:
6+
0: 0x7f7c3d359785 - <unknown>
7+
1: 0x7f7c3d3596d5 - std::backtrace::Backtrace::force_capture::hef0840345d34355a
8+
2: 0x7f7c3aa9b1ce - <unknown>
9+
3: 0x7f7c3d376833 - std::panicking::rust_panic_with_hook::h402df430f77b139b
10+
4: 0x7f7c3d37650a - <unknown>
11+
5: 0x7f7c3d373a89 - std::sys::backtrace::__rust_end_short_backtrace::hd6ee186b09085420
12+
6: 0x7f7c3d3761cf - rust_begin_unwind
13+
7: 0x7f7c39b4e480 - core::panicking::panic_fmt::h250731373fbf7c0c
14+
8: 0x7f7c39b4e8fa - core::panicking::assert_failed_inner::h0b63c78fb2eab9e0
15+
9: 0x7f7c3bb88747 - core[1da3e9e537ec24d4]::panicking::assert_failed::<u128, u128>
16+
10: 0x7f7c3bb6522c - <rustc_middle[d6b0322ea3151aaa]::query::on_disk_cache::OnDiskCache>::new
17+
11: 0x7f7c3b3dbd52 - rustc_incremental[539479ebccffad45]::persist::load::load_query_result_cache
18+
12: 0x7f7c3a9c8a7b - <unknown>
19+
13: 0x7f7c3aa7f596 - <unknown>
20+
14: 0x7f7c3aa15a97 - <unknown>
21+
15: 0x7f7c3aa30651 - std[6956e2ccddace8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_with_globals<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_pool_with_globals<rustc_interface[8bbda2bbdfb85682]::interface::run_compiler<(), rustc_driver_impl[a38dd6409c8212bc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22+
16: 0x7f7c3aa32693 - <unknown>
23+
17: 0x7f7c3d38212b - <unknown>
24+
25+
26+
rustc version: 1.86.0-nightly (05f9846f8 2025-03-31) (gentoo)
27+
platform: x86_64-unknown-linux-musl
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:511:5:
2+
assertion `left == right` failed
3+
left: 0
4+
right: 1002111927320821928687967599834759150
5+
stack backtrace:
6+
0: 0x7f1f0df59785 - <unknown>
7+
1: 0x7f1f0df596d5 - std::backtrace::Backtrace::force_capture::hef0840345d34355a
8+
2: 0x7f1f0b69b1ce - <unknown>
9+
3: 0x7f1f0df76833 - std::panicking::rust_panic_with_hook::h402df430f77b139b
10+
4: 0x7f1f0df7650a - <unknown>
11+
5: 0x7f1f0df73a89 - std::sys::backtrace::__rust_end_short_backtrace::hd6ee186b09085420
12+
6: 0x7f1f0df761cf - rust_begin_unwind
13+
7: 0x7f1f0a74e480 - core::panicking::panic_fmt::h250731373fbf7c0c
14+
8: 0x7f1f0a74e8fa - core::panicking::assert_failed_inner::h0b63c78fb2eab9e0
15+
9: 0x7f1f0c788747 - core[1da3e9e537ec24d4]::panicking::assert_failed::<u128, u128>
16+
10: 0x7f1f0c76522c - <rustc_middle[d6b0322ea3151aaa]::query::on_disk_cache::OnDiskCache>::new
17+
11: 0x7f1f0bfdbd52 - rustc_incremental[539479ebccffad45]::persist::load::load_query_result_cache
18+
12: 0x7f1f0b5c8a7b - <unknown>
19+
13: 0x7f1f0b67f596 - <unknown>
20+
14: 0x7f1f0b615a97 - <unknown>
21+
15: 0x7f1f0b630651 - std[6956e2ccddace8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_with_globals<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_pool_with_globals<rustc_interface[8bbda2bbdfb85682]::interface::run_compiler<(), rustc_driver_impl[a38dd6409c8212bc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22+
16: 0x7f1f0b632693 - <unknown>
23+
17: 0x7f1f0df8212b - <unknown>
24+
25+
26+
rustc version: 1.86.0-nightly (05f9846f8 2025-03-31) (gentoo)
27+
platform: x86_64-unknown-linux-musl
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
thread 'rustc' panicked at compiler/rustc_middle/src/query/on_disk_cache.rs:511:5:
2+
assertion `left == right` failed
3+
left: 0
4+
right: 1002111927320821928687967599834759150
5+
stack backtrace:
6+
0: 0x7f4893159785 - <unknown>
7+
1: 0x7f48931596d5 - std::backtrace::Backtrace::force_capture::hef0840345d34355a
8+
2: 0x7f489089b1ce - <unknown>
9+
3: 0x7f4893176833 - std::panicking::rust_panic_with_hook::h402df430f77b139b
10+
4: 0x7f489317650a - <unknown>
11+
5: 0x7f4893173a89 - std::sys::backtrace::__rust_end_short_backtrace::hd6ee186b09085420
12+
6: 0x7f48931761cf - rust_begin_unwind
13+
7: 0x7f488f94e480 - core::panicking::panic_fmt::h250731373fbf7c0c
14+
8: 0x7f488f94e8fa - core::panicking::assert_failed_inner::h0b63c78fb2eab9e0
15+
9: 0x7f4891988747 - core[1da3e9e537ec24d4]::panicking::assert_failed::<u128, u128>
16+
10: 0x7f489196522c - <rustc_middle[d6b0322ea3151aaa]::query::on_disk_cache::OnDiskCache>::new
17+
11: 0x7f48911dbd52 - rustc_incremental[539479ebccffad45]::persist::load::load_query_result_cache
18+
12: 0x7f48907c8a7b - <unknown>
19+
13: 0x7f489087f596 - <unknown>
20+
14: 0x7f4890815a97 - <unknown>
21+
15: 0x7f4890830651 - std[6956e2ccddace8c]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_with_globals<rustc_interface[8bbda2bbdfb85682]::util::run_in_thread_pool_with_globals<rustc_interface[8bbda2bbdfb85682]::interface::run_compiler<(), rustc_driver_impl[a38dd6409c8212bc]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22+
16: 0x7f4890832693 - <unknown>
23+
17: 0x7f489318212b - <unknown>
24+
25+
26+
rustc version: 1.86.0-nightly (05f9846f8 2025-03-31) (gentoo)
27+
platform: x86_64-unknown-linux-musl

src/unix/linux_like/linux/mod.rs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Linux-specific definitions for linux-like values
22
3-
use core::mem::size_of;
3+
use core::{cfg, mem::size_of};
44

55
use crate::prelude::*;
66
use crate::{sock_filter, _IO, _IOR, _IOW, _IOWR};
@@ -2851,9 +2851,17 @@ pub const IPC_NOWAIT: c_int = 0o4000;
28512851

28522852
pub const IPC_RMID: c_int = 0;
28532853
pub const IPC_SET: c_int = 1;
2854-
pub const IPC_STAT: c_int = 2;
2854+
pub const IPC_STAT: c_int = if cfg!(musl32_time64) {
2855+
0x102
2856+
} else {
2857+
2
2858+
};
28552859
pub const IPC_INFO: c_int = 3;
2856-
pub const MSG_STAT: c_int = 11;
2860+
pub const MSG_STAT: c_int = if cfg!(musl32_time64) {
2861+
0x10b
2862+
} else {
2863+
11
2864+
};
28572865
pub const MSG_INFO: c_int = 12;
28582866
pub const MSG_NOTIFICATION: c_int = 0x8000;
28592867

@@ -2870,9 +2878,17 @@ pub const GETNCNT: c_int = 14;
28702878
pub const GETZCNT: c_int = 15;
28712879
pub const SETVAL: c_int = 16;
28722880
pub const SETALL: c_int = 17;
2873-
pub const SEM_STAT: c_int = 18;
2881+
pub const SEM_STAT: c_int = if cfg!(musl32_time64) {
2882+
0x112
2883+
} else {
2884+
18
2885+
};
28742886
pub const SEM_INFO: c_int = 19;
2875-
pub const SEM_STAT_ANY: c_int = 20;
2887+
pub const SEM_STAT_ANY: c_int = if cfg!(musl32_time64) {
2888+
0x114
2889+
} else {
2890+
20
2891+
};
28762892

28772893
pub const SHM_R: c_int = 0o400;
28782894
pub const SHM_W: c_int = 0o200;

0 commit comments

Comments
 (0)