Files
boc/rust-service/target/debug/deps/libsignal_hook_registry-cb4f4a08e32ec862.rmeta
T

163 lines
63 KiB
Plaintext
Raw Normal View History

rust
üú#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0ÁerrnoÁðšÿçNš&^
:Ón­-ef17a36a98ab2a47Á?A©ú¡E2¯ëäu-8e0657b9e365f274ÁHtestsÁ,Š
$ÿ c_intÁ,žâ<‰ sighandler_tÁd¥â!SIGFPEÁ4œâ<‡SIGILLÁ4¤âSIGSEGVÁ<¬â13SIG_DFLÁ<é âSIG_IGNÁ<š!â<Š!SIG_GETÁ<Ë!â<»!SIG_ERRÁ<ü!â<ì! siginfo_tÁL#â<Ñ"handlerÁ<Ôlâ<¼lFORBIDDEN_IMPLÁt÷âœ,¼ê$±êÀÄ half_lockÁ 
  
 YIELD_EVERYÁ
MAX_GUARDSÁ ReadGuardÁ'aÁ¥dataÁlockÁ  ¥å´    ¥ ã
WriteGuardÁ$  $¥$_guardÁ$» $° *  *¥*È.  .¥.å.´HalfLockÁ3¥3ý3° 3
generationÁ3» 8 3 write_mutexÁ;¥;æ ;readÁ; update_seenÁ? ;
write_barrierÁA A ;writeÁE¥Eãvec_mapÁHHJœJ§Jæ Jis_emptyÁJclearÁJfindÁJcontainsÁJgetÁJget_mutÁJinsertÁJremoveÁJ¼VV  
  
ActionÁræ tdetectÁtexecuteÁv SigActionÁ
GlobalDataÁx° x
race_fallbackÁ GLOBAL_DATAÁ GLOBAL_INITÁ}}ensureÁ µ
 MSGÁ
ErrnoGuardÁ
ˆæ ã FORBIDDENÁÏ
registerÁ register_sigactionÁregister_sigaction_implÁregister_signal_uncheckedÁ register_uncheckedÁregister_unchecked_implÁ
unregisterÁunregister_signalÁHVecMapÁ
œ§ˆH œ § ƒH¤œ¤§¤>ActionIdÁ¨
¨ˆ­ƒ¯× ±Ö
 ´ 
¸ï
º§»ùSigIdÁ½signalÁ½actionÁƒÄׯÖÉËÍï
ϧÐùSlotÁÒprevÁÒactionsÁÕƒ
SignalDataÁ×signalsÁ×next_idÁÚƒPrevÁÜ«ÜinfoÁ߃
#
-
2
>
?
?
A
D
G
N
O
P
P
Q
Q
R
R
S
S
T
U
U
V
q
v
Š




£
®
°
°
°
²
µ
µ
·
·
¹
¹
»
»
Ã
Å
Å
Å
Ç
Ê
Ê
Ì
Ì
Î
Î
Ð
Ð
Ö
Û
à
W8é! ° »  K 8g²  ¥Œ"äé!$$ÿ 'ž
(» )° -8¦•EÈ£W  žŒ"33ò
5ý6° 78» :²F1U:¤†Ò.¥Øœ¹ŸˆH 0¯3ÖèTœ§³âŠ ¨¨©šªˆ &ß«:«Œ£É۰ذ¿c°°Ð찵߰°º°íß°°še°Š ½½ž¾«¿¹xÙ
+`ã,ÛË ØË ¿cË Ë ÐìË µßË Ë ºË íßË Ë šeË ØÒÒ®ÓºÔÆ´”˜÷è÷1Ø××àØòÙ?«ë#Å“ØÜÜݫޯ©æ„væ6Œ"üˆ BUÿÕÊ}.$ E3‰ ­¨Â½ÕÒÚ×ßܤ«¨À½¬¨Á½¯¨Ä½±¨Æ½³¨È½´¨É½¨Ë½¸¨Í½º¨Ï½é!ÊŒ"
س*Š Û¿cÐìµßºíßše16Á¬ºÔ÷%ü 0÷%$;Ôš&÷%÷%÷%ü̃C
 ÷%@7D 
Ç' Ž„ ü¥ƒkƒò',°ƒÄ'Ä'5Cb"Platform broken, got NULL as siginfo to signal handler. Aborting"Á Œ 
ü°/©)'HŒ©)FORBIDDEN_IMPLÁüäŽ,
Œ ¬)÷%6CP©)  üÃŽNŒ©)DÙŽ§*˜§*Ÿ©*üåŽ+§*±G<æŽä¬)<J¬)4øŽá¬)4€ã¬)<ˆå¬)l ¬)bä¬)`¶J¬)^á¬)\ã¬)Zå¬)ZiŒ§*©*çÝä¬)Ú¶J¬)×á¬)Ôã¬)Ñå¬)¼‚ œ+â6ªBªBö­BbufÁ÷<®B÷<9)
-ÜnLçEçEèEGlobalÁ ¿±‡§í#ª±|Ñ* ¨©%°07>ŒÄ‰ &ª#1''(ErrnoÁ)ˆ ÇK…Hˆ<nelHqx{|Œ˜š¨©½Ò×ÜÀÄErrorÁ,¤ßYí´ëZµ Â[ AtomicPtrÁL߯]]®¼À^ ONCE_INITÁLƒ ü8_Kž†JaOnceÁ$£ï8b¨/,¶'c¨/(c´¿¬eÐË4f sigactionÁLìÅNgÀ2 g
¬Phé ãj‚ 4Ý ákSIGKILLÁ<å äl™ <î åmSIGSTOPÁ<÷ ¶Jnò
3o¹Žüƒ'$ Backend of the [signal-hook] crate.Á«úü¯[X The [signal-hook] crate tries to provide an API to the unix signals, which are a globalÁü‹^[ resource. Therefore, it is desirable an application contains just one version of the crateÁüê`] which manages this global resource. But that makes it impossible to make breaking changes inÁ the API.ÁØúüÜa^ Therefore, this crate provides very minimal and low level API to the signals that is unlikelyÁü¾b_ to have to change, while there may be multiple versions of the [signal-hook] that all use thisÁü¡GD low-level API to provide different versions of the high level APIs.Áéúüí^[ It is also possible some other crates might want to build a completely different API. ThisÁüÌa^ split allows these crates to still reuse the same low-level routines in this crate instead ofÁü®2/ going to the (much more dangerous) unix calls.Ááúôå # What this crate providesÁúüˆa^ The only thing this crate does is multiplexing the signals. An application or library can addÁüêHE or remove callbacks and have multiple callbacks for the same signal.Á³ úü· VS It handles dispatching the callbacks and managing them in a way that uses only theÁüŽ
b_ [async-signal-safe] functions inside the signal handler. Note that the callbacks are still runÁüñ
PM inside the signal handler, so it is up to the caller to ensure they are alsoÁÄ  [async-signal-safe].ÁÛ ú´ß  # What this is forÁö úüú [X This is a building block for other libraries creating reasonable abstractions on top ofÁüÖ c` signals. The [signal-hook] is the generally preferred way if you need to handle signals in yourÁüº
?< application and provides several safe patterns of doing so.Áú
úüþ
 # Rust version compatibilityÁŸúü£[X Currently builds on 1.26.0 an newer and this is very unlikely to change. However, testsÁüÿb_ require dependencies that don't build there, so tests need newer Rust version (they are run onÁ stable).Áïúüóa^ Note that this ancient version of rustc no longer compiles current versions of `libc`. If youÁüÕ_\ want to use rustc this old, you need to force your dependency resolution to pick old enoughÁüµLI version of `libc` (`0.2.156` was found to work, but newer ones may too).ÁúŒ† # PortabilityÁ˜úüœ\Y This crate includes a limited support for Windows, based on `signal`/`raise` in the CRT.Áüù30 There are differences in both API and behavior:Á­úü±`] - Due to lack of `siginfo_t`, we don't provide `register_sigaction` or `register_unchecked`.Áü’?< - Due to lack of signal blocking, there's a race condition.ÁüÒJG After the call to `signal`, there's a moment where we miss a signal.ÁüQN That means when you register a handler, there may be a signal which invokesÁüï>; neither the default handler or the handler you register.Áü®MJ - Handlers registered by `signal` in Windows are cleared on first signal.Áüü_\ To match behavior in other platforms, we re-register the handler each time the handler isÁüÜ;8 called, but there's a moment where we miss a handler.Áü˜[X That means when you receive two signals in a row, there may be a signal which invokesÁüôRO the default handler, nevertheless you certainly have registered the handler.ÁÇúüË.+ [signal-hook]: https://docs.rs/signal-hookÁüúVS [async-signal-safe]: http://www.man7.org/linux/man-pages/man7/signal-safety.7.htmlÁtHqx{|Œ˜š¨©½Ò×ÜÀ%Ä&%Á0ßYíëZµ [ÿ0¯]]®¼À^¯1 ü8_K†JaÞ1ï8b¨/'c¨/(c´¿¬eÐË4fÀ2öÅNgÀ2 g
ö¬Phéõ ãjô ák¨3ì älë åm×3ã ¶Jnò
â3o¹ápé”ÒâŒæ×$3ó,¸Ò PhantomDataÁ\бVr,ëé!atomicÁ$Š]
ÿ0L¯] AtomicUsizeÁ\„Ä ®¼À
¤µ>¥½T PoisonErrorÁ\ÖÑ@Ц#Äà íŒöÚ4Íϳµ£¥L·ˆŠnp\ècR\‡÷%¼ ÷%üÒ&  ¥Íìž òž  õêZ\ÿä K 8g²#î:<4$ÿ   ž¬$   ¤]¤]V¦]Á‚]üß3ø¤”&÷%üª&  ¥ÚZ ³äê!ë!¯ž¬ìá áä áž õ
  žüŸ%  !¥"!"ÚZ ¨ä#"#¤”Ëâ âä  Ó
#  žüÖ'  %¥&&%ÚZ ÷êZúêZ¬¤µ-8¦•EÈ£W'()ó24%Ô„4„$$½T½T¥ÀT» £>ÁTpoisonÁ£>0ªk¥a  ã^$$   33ò
5ý6° 78» :²F1U:¤†Ò.ž\¿$¿$$Â[ìÏ  +¥,,+ÚZ ص-Ôüó&,ã 㵞ã^* *
-  ž¹ü·'  /¥00/ÚZ Àµ12ê!ë!2¼..ž¬úä äµ äž. ƒ.
2  ž$„ìÐ¥44ÍìÕ ëƒF1U:¤†Ò.5678:G"$”¤¤33±VFu\»ŸÕ”á33¤]¤]V¦]Á‚]üß3ø¤”& Õ¼Î33ç[´“$“33ç[÷% §÷%´Þ33µ>µ>¤·>innerÁ£>¸>´_£>¹>° £>Ë»™z™g—ã^œù¥<<€e þƒ=>?ADü“"¡Õƒ;;
=Õ° üª"-$¸"å åƒ ° »  K 8g²åÕ; ½";
>Õ$¾"ü00\„0æç æƒ ç÷%ã^; 0;
?Õ$0 seen_zeroÁL—0 ®0÷%¼Ë1lÎ1è èƒã^; Ü1;
AÕ$Ý1 â3AA÷%¿6A<closure_kind>ÁC<closure_signature>ÁC<upvars>ÁCCACÕ ã^üû:/,‰;é éƒ$$ÿ 'ž
(» )° -8¦•EÈ£WéÕ; ;;
DÕ$;äÕA¥FF€e ÚAƒG"G”øA$ûAê êƒã^E €BE
GÕ$…B\‰<œí ëHIDÜ©œK§LKLÍì ®Íì µ±âMNOPQRSTUV:<79¤ËÒâJJ
MôˆDë ëâJ ˜J
N$™¼Îì ìâã^J ÛJ
Oü‹(Híî íâ îÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ÷%J J
P$”keyÁšü×'ïð ïâ ðJ çJ
Qôrîü­(´ñò ñâ òÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ ñJ ¸J
Rôr¿üÑ4óô óâ ôÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ óJ àJ
Sôrëü… 7
.
ö÷ öâ ÷£xJ õ
J
U
ôr ü— 0 ø øâøWJ ¥ J
V ÀB¯ V8žžVâ­â­MapÁå­ùæ­±Å@Iœóë ¶¥ÄlÄlIterÁÇlµ ™lÈl
end_or_lenÁ™lÉl_markerÁ™lŒœjSž8Ô.Xïl 8Ô. 8™ã^Íì8WùMî|œ´ î|úM×|L½ æ|,ƒ}}V V—kX¯kXÌkXXVXïl Ô. ã^tH[nŒËŠŠ¤øºL’ÍÍää÷//KKoo±±ÅÅààœ»ô\¬.4±.ù" ù¬P¬P
­Psi_signoÁ®Psi_errnoÁ¯Psi_codeÁ°P_padÁ²P_alignÁµIOQ|,gz?¦ù˜"Ìã^ ÌìL0í!süœ32â<3LŒ3¤ƒ3Ÿ3¬)Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
í!ßßÁ0à ¬
ÑøÿËO Ÿrr
s«4£3LÍEë"uvü€H/â<ñGLðG¤çG4ƒH¬)Ö¿Ù¿Ú¿«Û¿ˆÜ¿Ý¿Þ¿ˆ‚†f|Â
ë"‚‚tt
u«4ŠHüØRMâ<ÜPLÛP¤ÒP<âRú úë"¬) × Ë4Ì4Í4
__variant1ÁÎ4Ï4
__variant2Áë òg ã^t êRt
v$ëRsigÁñR¯$ýR° $“St„]L‰]¬)τӄã^Œ„bT‹bxxùy° z ¼aÝóÔÌÇ ¼aÝóÔÌÇyzÔèb$èbxx33ò
5ý6° 78» :²F1U:¤†Ò.¬"ü¡d%l¡dxx33ò
5ý6° 78» :²F1U:¤†Ò.Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙë"üËd)\Òd¤]¤]V¦]Á‚]üß3ø¤”& “†ÃÄ­e\´eï8ï8Þ1ð8µfé8ãTPàVçaB|Ôe“†~Ìêeíe “†}}
~äÕh4ØhåŠ}}
’i—k¯kÌk¬)ã^ã^ã^üþ{Jâ<zLz¤ˆz<Œ|¬)τӄã^
Ä”|¯$ |° $¶|®—k¯kÌk¬)ã^ ×ã^„¥ƒ«ƒ ô'hTˉª#BUÿÕÊ}0ª#Šh90ª#
,Ö‰0|߉ª#ˆ„õ‰ø‰ª#
ˆÄ´Šª#Š"Š”ÓŠ$ÖŠû ûª#ã^ ÛŠ
Š$àŠì°ô“‹ List of forbidden signals.Á²‹úü¶‹_\ Some signals are impossible to replace according to POSIX and some are so special that thisÁü–Œ_\ library refuses to handle them (eg. SIGSEGV). The routines panic in case registering one ofÁüöŒ these signals is attempted.Áú¬š See [`register`].ÁLº «)ôÃŽâ<¸ŽL·Ž¤®ŽtÉŽ·“ü¾¹vü“74 Registers an arbitrary action for the given signal.ÁËúüÏa^ This makes sure there's a signal handler for the given signal. It then adds the action to theÁü±c` ones called each time the signal is delivered. If multiple actions are set for the same signal,Áü•‘1. all are called, in the order of registration.ÁÇ‘úüË‘da If there was a previous signal handler for the given signal, it is chained ‒ it will be calledÁü°’[X as part of this library's signal handler, before any actions set through this function.ÁŒ“úü[X On success, the function returns an ID that can be used to remove the action again withÁœì“ [`unregister`].Á€”úd„” # PanicsÁ‘”úü•”0- If the signal is one of (see [`FORBIDDEN`]):ÁÆ”ú|Ê” * `SIGKILL`Á|Ú” * `SIGSTOP`Átê” * `SIGILL`Átù” * `SIGFPE`Á|ˆ• * `SIGSEGV`Á˜•úüœ•`] The first two are not possible to override (and the underlying C functions simply ignore allÁüý•a^ requests to do so, which smells of possible bugs, or return errors). The rest can be set, butÁüß–XU generally needs very special handling to do so correctly (direct manipulation of theÁü¸—^[ application's address space, `longjmp` and similar). Unless you know very well what you'reÁü—˜YV doing, you'll shoot yourself into the foot and this library won't help you with that.Áñ˜údõ˜ # ErrorsÁ‚™úü†™_\ Since the library manipulates signals using the low-level C functions, all these can returnÁüæ™`] errors. Generally, the errors mean something like the specified signal does not exist on theÁüÇšc` given platform ‒ after a program is debugged and tested on a given OS, it should never returnÁl«›
an error.Á¹›úü½›b_ However, if an error *is* returned, there are no guarantees if the given action was registeredÁ\ œ or not.Á¬œúd°œ # SafetyÁ½œúüÁœ_\ This function is unsafe, because the `action` is run inside a signal handler. While Rust isÁü¡ZW somewhat vague about the consequences of such, it is reasonably to assume that similarÁüü0- restrictions as specified in C or C++ apply.Á­žú”±ž In particular:ÁÄžúüÈžc` * Calling any OS functions that are not async-signal-safe as specified as POSIX is not allowed.Áü¬Ÿa^ * Accessing globals or thread-locals without synchronization is not allowed (however, mutexesÁüŽ a^ are not within the async-signal-safe functions, therefore the synchronization is limited toÁ¬ð  using atomics).Á†¡úüŠ¡b_ The underlying reason is, signals are asynchronous (they can happen at arbitrary time) and areÁüí¡c` run in context of arbitrary thread (with some limited control of at which thread they can run).ÁüÑ¢^[ As a consequence, things like mutexes are prone to deadlocks, memory allocators can likelyÁü°£ZW contain mutexes and the compiler doesn't expect the interruption during optimizations.Á‹¤úü¤_\ Things that generally are part of the async-signal-safe set (though check specifically) areÁüï¤a^ routines to terminate the program, to further manipulate signals (by the low-level functions,ÁüÑ¥[X not by this library) and to read and write file descriptors. The async-signal-safety isÁü­¦b_ transitive - that is, a function composed only from computations (with local variables or withÁü§b_ variables accessed with proper synchronizations) and other async-signal-safe functions is alsoÁLó§ safe.Áý§úü¨\Y As panicking from within a signal handler would be a panic across FFI boundary (which isÁüÞ¨;8 undefined behavior), the passed handler must not panic.Áš©úüž©c` Note that many innocently-looking functions do contain some of the forbidden routines (a lot ofÁ삪 things lock or allocate).Á ªúü¤ªZW If you find these limitations hard to satisfy, choose from the helper functions in theÁüÿªa^ [signal-hook](https://docs.rs/signal-hook) crate ‒ these provide safe interface to use someÁüá«# common signal handling patters.Á…¬ú¤‰¬ # Race conditionÁž¬úü¢¬^[ Upon registering the first hook for a given signal into this library, there's a short raceÁü­0- condition under the following circumstances:Á²­úü¶­a^ * The program already has a signal handler installed for this particular signal (through someÁü˜® other library, possibly).Áü¸®[X * Concurrently, some other thread installs a different signal handler while it is beingÁü”¯  installed by this library.Áüµ¯0- * At the same time, the signal is delivered.Áæ¯úüê¯c` Under such conditions signal-hook might wrongly "chain" to the older signal handler for a shortÁüΰ52 while (until the registration is fully complete).Á„±úüˆ±_\ Note that the exact conditions of the race condition might change in future versions of theÁüè±b_ library. The recommended way to avoid it is to register signals before starting any additionalÁü˲>; threads, or at least not to register signals concurrently.Áгúü޳JG Alternatively, make sure all signals are handled through this library.ÁÙ³úŒÝ³ # PerformanceÁï³úüó³^[ Even when it is possible to repeatedly install and remove actions during the lifetime of aÁüÒ´_\ program, the installation and removal is considered a slow operation and should not be doneÁü²µ]Z very often. Also, there's limited (though huge) amount of distinct IDs (they are `u128`).Áút”¶ # ExamplesÁ£¶ú
# WarningÁ¬Üúü°Üa^ This does *not* currently return the default/previous signal handler if the last action for aÁü’Ý`] signal was just unregistered. That means that if you replaced for example `SIGTERM` and thenÁüóÝ^[ removed the action, the program will effectively ignore `SIGTERM` signals from now on, notÁüÒÞb_ terminate on them as is the default action. This is OK if you remove it as part of a shutdown,ÁüµßXU but it is not recommended to remove termination actions during the normal runtime ofÁüŽà`] application (unless the desired effect is to create something that can be terminated only byÁlïà
SIGKILL).ÁT„áË 
idÁáüéæ/1.3.0ÁEDon't use. Can influence unrelated parts of program / unknown actionsÁüæGüáåx4àæŒðæÙäâäL¬)
š«4‚ç]4œ§žžüo Œp â0¯3ÖèTœŸ—.â]cH—.â
œprvxH—.(ñ œ¡§¢¢¡üoÖŒpÔØØâ£Ù£  ââ ñ 
£Ú8ø
œ¥§¦¦¥üo²Œp±³³â§´§éìñô⤤
§DØ*°&ß«:«Œ£É©ªÐ/°5Ð/°¨¨