{"id":310580,"date":"2020-09-28T09:00:48","date_gmt":"2020-09-28T09:00:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310580"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310580","title":{"rendered":"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0421\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/520920\/\">\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u0435\u043b \u0431\u0430\u0433-\u0440\u0435\u043f\u043e\u0440\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Debian, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u0440\u043c\u0438\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0435\u0440\u0443\u043d\u0434\u0443 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/git.sr.ht\/~sircmpwn\/scdoc\" rel=\"nofollow\">scdoc<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b <code>SIGSEGV<\/code>. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043c\u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>musl libc<\/code> \u0438 <code>glibc<\/code>. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441:<\/p>\n<pre><code class=\"cmake\">==26267==ERROR: AddressSanitizer: SEGV on unknown address 0x7f9925764184 (pc 0x0000004c5d4d bp 0x000000000002 sp 0x7ffe7f8574d0 T0) ==26267==The signal is caused by a READ memory access.     0 0x4c5d4d in parse_text \/scdoc\/src\/main.c:223:61     1 0x4c476c in parse_document \/scdoc\/src\/main.c     2 0x4c3544 in main \/scdoc\/src\/main.c:763:2     3 0x7f99252ab0b2 in __libc_start_main \/build\/glibc-YYA7BZ\/glibc-2.31\/csu\/..\/csu\/libc-start.c:308:16     4 0x41b3fd in _start (\/scdoc\/scdoc+0x41b3fd) <\/code><\/pre>\n<p>  \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e:<\/p>\n<pre><code class=\"cs\">if (!isalnum(last) || ((p-&gt;flags &amp; FORMAT_UNDERLINE) &amp;&amp; !isalnum(next))) { <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430: <code>p<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439, \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>last<\/code> \u0438 <code>next<\/code> \u0438\u043c\u0435\u044e\u0442 \u0442\u0438\u043f <code>uint32_t<\/code>. \u0421\u0435\u0433\u0444\u043e\u043b\u0442 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>isalnum<\/code>. \u0418, \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 glibc, \u043d\u043e \u043d\u0435 musl libc. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0432\u044b \u043d\u0435 \u043e\u0434\u0438\u043d\u043e\u043a\u0438: \u0442\u0443\u0442 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435\u0447\u0435\u043c\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0433\u0444\u043e\u043b\u0442.<a name=\"habracut\"><\/a><\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u044b\u043b\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 glibc, \u044f \u0434\u043e\u0441\u0442\u0430\u043b \u0435\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>isalnum<\/code>, \u0433\u043e\u0442\u043e\u0432\u044f\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0443\u0440\u0430\u0446\u043a\u043e\u0439 \u0445\u0435\u0440\u043d\u0435\u0439. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u044f \u0434\u043e\u0439\u0434\u0443 \u0434\u043e \u0434\u0443\u0440\u0430\u0446\u043a\u043e\u0439 \u0445\u0435\u0440\u043d\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0430\u043c, \u0443\u0436 \u043f\u043e\u0432\u0435\u0440\u044c\u0442\u0435, <i>\u043d\u0430\u0432\u0430\u043b\u043e\u043c<\/i>, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u043d\u044c\u043a\u043e \u043f\u043e\u0433\u043b\u044f\u0434\u0438\u043c \u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412\u043e\u0442 \u0442\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>isalnum<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 musl libc:<\/p>\n<pre><code class=\"cs\">int isalnum(int c) { \treturn isalpha(c) || isdigit(c); }  int isalpha(int c) { \treturn ((unsigned)c|32)-'a' &lt; 26; }  int isdigit(int c) { \treturn (unsigned)c-'0' &lt; 10; } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>c<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u0441\u0435\u0433\u0444\u043e\u043b\u0442\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0445\u0440\u0435\u043d\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 <code>isalnum<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u043a\u0438\u0434\u0430\u0442\u044c \u0441\u0435\u0433\u0444\u043e\u043b\u0442?<\/p>\n<p>  \u041b\u0430\u0434\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u044d\u0442\u043e \u0441 <a href=\"https:\/\/sourceware.org\/git\/?p=glibc.git;a=blob;f=ctype\/ctype.h;h=351495aa4feaf23993fe65afc0760615268d044e;hb=HEAD\" rel=\"nofollow\">\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 glibc<\/a>. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f GNU&#8217;\u0448\u043d\u0430\u044f \u0433\u0430\u043b\u0438\u043c\u0430\u0442\u044c\u044f, \u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0435 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0439\u0442\u0438 <code>isalnum<\/code>.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cs\">enum {   _ISupper = _ISbit (0),        \/* UPPERCASE.  *\/   _ISlower = _ISbit (1),        \/* lowercase.  *\/   \/\/ ...   _ISalnum = _ISbit (11)        \/* Alphanumeric.  *\/ }; <\/code><\/pre>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0434\u0435\u0442\u0430\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<pre><code class=\"cs\">__exctype (isalnum); <\/code><\/pre>\n<p>  \u041d\u043e \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>__exctype<\/code>? \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0432\u0432\u0435\u0440\u0445\u2026<\/p>\n<pre><code class=\"cs\">#define __exctype(name) extern int name (int) __THROW <\/code><\/pre>\n<p>  \u041b\u0430\u0434\u043d\u043e, \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f. \u041d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043f\u0440\u0430\u0432\u0434\u0430, \u0437\u0430\u0447\u0435\u043c \u0442\u0443\u0442 \u043d\u0443\u0436\u0435\u043d \u043c\u0430\u043a\u0440\u043e\u0441. \u0418\u0449\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435\u2026<\/p>\n<pre><code class=\"cs\">#if !defined __NO_CTYPE # ifdef __isctype_f __isctype_f (alnum) \/\/ ... <\/code><\/pre>\n<p>  \u0422\u0430\u043a, \u0432\u043e\u0442 \u044d\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>__isctype_f<\/code>? \u041c\u043e\u0442\u0430\u0435\u043c \u0432\u0432\u0435\u0440\u0445\u2026<\/p>\n<pre><code class=\"cs\">#ifndef __cplusplus # define __isctype(c, type) \\   ((*__ctype_b_loc ())[(int) (c)] &amp; (unsigned short int) type) #elif defined __USE_EXTERN_INLINES # define __isctype_f(type) \\   __extern_inline int                                                         \\   is##type (int __c) __THROW                                                  \\   {                                                                           \\     return (*__ctype_b_loc ())[(int) (__c)] &amp; (unsigned short int) _IS##type; \\   } #endif <\/code><\/pre>\n<p>  \u041d\u0443 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f\u2026 \u041b\u0430\u0434\u043d\u043e, \u0432\u043c\u0435\u0441\u0442\u0435 \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f. \u0412\u0438\u0434\u0438\u043c\u043e, <code>__isctype_f<\/code> \u2014 \u044d\u0442\u043e \u0438\u043d\u043b\u0430\u0439\u043d-\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u2026 \u0441\u0442\u043e\u043f, \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 else \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 #ifndef __cplusplus. \u0422\u0443\u043f\u0438\u043a. \u0413\u0434\u0435 \u0436\u0435 <code>isalnum<\/code>, \u043c\u0430\u0442\u044c \u0435\u0435, <i>\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435<\/i> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430? \u0418\u0449\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435\u2026 \u041c\u043e\u0436\u0435\u0442 \u0432\u043e\u0442 \u043e\u043d\u043e?<\/p>\n<pre><code class=\"cs\">#if !defined __NO_CTYPE # ifdef __isctype_f __isctype_f (alnum) \/\/ ... # elif defined __isctype # define isalnum(c)     __isctype((c), _ISalnum) \/\/ &lt;- \u0432\u043e\u0442 \u0442\u0443\u0442 <\/code><\/pre>\n<p>  \u042d\u0439, \u044d\u0442\u043e \u0436\u0435 \u00ab\u0434\u0435\u0442\u0430\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00bb, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435. \u041f\u043e\u043c\u043d\u0438\u0442\u0435?<\/p>\n<pre><code class=\"cs\">enum {   _ISupper = _ISbit (0),        \/* UPPERCASE.  *\/   _ISlower = _ISbit (1),        \/* lowercase.  *\/   \/\/ ...   _ISalnum = _ISbit (11)        \/* Alphanumeric.  *\/ }; <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e-\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u0443 \u0440\u0430\u0441\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u043a\u0440\u043e\u0441:<\/p>\n<pre><code class=\"cs\"># include &lt;bits\/endian.h&gt; # if __BYTE_ORDER == __BIG_ENDIAN #  define _ISbit(bit)   (1 &lt;&lt; (bit)) # else \/* __BYTE_ORDER == __LITTLE_ENDIAN *\/ #  define _ISbit(bit)   ((bit) &lt; 8 ? ((1 &lt;&lt; (bit)) &lt;&lt; 8) : ((1 &lt;&lt; (bit)) &gt;&gt; 8)) # endif <\/code><\/pre>\n<p>  \u041d\u0443 \u0447\u0442\u043e \u0437\u0430 \u0445\u0435\u0440\u043d\u044f? \u041b\u0430\u0434\u043d\u043e, \u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430. \u0414\u0440\u0443\u0433\u043e\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>__isctype<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u0438\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 <code>__isctype_f<\/code>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 \u0440\u0430\u0437\u043e\u043a \u043d\u0430 \u0432\u0435\u0442\u043a\u0443 <code>#ifndef __cplusplus<\/code>:<\/p>\n<pre><code class=\"cs\">#ifndef __cplusplus # define __isctype(c, type) \\   ((*__ctype_b_loc ())[(int) (c)] &amp; (unsigned short int) type) #elif defined __USE_EXTERN_INLINES \/\/ ... #endif <\/code><\/pre>\n<p>  \u042d\u044d\u044d\u2026<\/p>\n<p>  \u041d\u0443, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0441\u0435\u0433\u0444\u043e\u043b\u0442. \u0410 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>__ctype_b_loc<\/code>?<\/p>\n<pre><code class=\"cs\">\/* \u042d\u0442\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 ctype-info.c.    \u041e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 localeinfo.h.     \u0412 \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u0435\u0439, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u043d\u0430 \u043f\u043e\u0442\u043e\u043a\u0430\u0445, (\u0441\u043c. `uselocale' \u0432 &lt;locale.h&gt;)    \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435.    \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e, \u043d\u0438\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0430\u043a\u0441\u0435\u0441\u0441\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0430\u0434\u0440\u0435\u0441    \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0439\u0441\u044f \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443, \u0435\u0441\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.     \u041e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438\u0437 384 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e    \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `unsigned char' [0,255]; \u0430 \u0442\u0430\u043a\u0436\u0435 EOF (-1); \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0435    \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `signed char' value [-128,-1).  ISO C \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ctype \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438    \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 `unsigned char' \u0438 EOF; \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435    \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f `signed char' \u0434\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438.    \u041c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 `int`,    \u0430 \u043d\u0435 `unsigned char`, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e `tolower(EOF)' \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c EOF, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435    \u043d\u0435 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d `unsigned char`. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 - \u0442\u043e, \u0447\u0442\u043e    \u044d\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043e\u043a.  *\/ extern const unsigned short int **__ctype_b_loc (void)      __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void)      __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void)      __THROW __attribute__ ((__const__)); <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043a\u0440\u0443\u0442\u043e \u0441 \u0442\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, glibc! \u042f \u043f\u0440\u043e\u0441\u0442\u043e <i>\u043e\u0431\u043e\u0436\u0430\u044e<\/i> \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u043b\u043e\u043a\u0430\u043b\u044f\u043c\u0438. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u043a \u043c\u043e\u0435\u043c\u0443 \u0443\u043f\u0430\u0432\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d gdb, \u0438 \u0434\u0435\u0440\u0436\u0430 \u0432 \u0443\u043c\u0435 \u0432\u0441\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u044f \u043f\u0438\u0448\u0443 \u0432\u043e\u0442 \u044d\u0442\u043e \u0443\u0431\u043e\u0436\u0435\u0441\u0442\u0432\u043e:<\/p>\n<pre><code class=\"cs\">(gdb) print ((unsigned int **(*)(void))__ctype_b_loc)()[next] Cannot access memory at address 0x11dfa68 <\/code><\/pre>\n<p>  \u0421\u0435\u0433\u0444\u043e\u043b\u0442 \u043d\u0430\u0439\u0434\u0435\u043d. \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0430: \u00abISO C \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ctype \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 `unsigned char&#8217; \u0438 EOF\u00bb. \u0415\u0441\u043b\u0438 \u043d\u0430\u0439\u0442\u0438 \u044d\u0442\u043e \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0443\u0432\u0438\u0434\u0438\u043c:<\/p>\n<blockquote><p>\u0412\u043e \u0432\u0441\u0435\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 [\u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 ctype.h], \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f int, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432 unsigned char, \u0438\u043b\u0438 \u0436\u0435 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043c\u0430\u043a\u0440\u043e\u0441\u0430 EOF.  <\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041c\u043e\u0439 \u043a\u043e\u0441\u044f\u043a. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0432 <code>isalnum<\/code> \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b UCS-32 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0435\u0433\u043e \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b 0x30-0x39, 0x41-0x5A \u0438 0x61-0x7A.<\/p>\n<p>  \u041d\u043e \u0442\u0443\u0442 \u044f \u0432\u043e\u0437\u044c\u043c\u0443 \u043d\u0430 \u0441\u0435\u0431\u044f \u0441\u043c\u0435\u043b\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c: \u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>isalnum<\/code> \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043a\u0438\u0434\u0430\u0442\u044c \u0441\u0435\u0433\u0444\u043e\u043b\u0442, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0443\u0442? \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u044d\u0442\u043e <i>\u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442<\/i>, \u044d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0430\u043a <i>\u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c<\/i>? \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043d\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u0437\u0443\u043c\u043d\u043e\u0439 \u0438\u0434\u0435\u0438, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043f\u044f\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 C++, \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0431\u0430\u0439\u0442\u043e\u0432 \u0432\u0430\u0448\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u0438\u0441\u043a\u0430, \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043b\u043e\u043a\u0430\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f?<\/p>\n<p>  \u0415\u0449\u0435 \u0440\u0430\u0437\u043e\u043a \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044e \u0432 musl \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cs\">int isalnum(int c) { \treturn isalpha(c) || isdigit(c); }  int isalpha(int c) { \treturn ((unsigned)c|32)-'a' &lt; 26; }  int isdigit(int c) { \treturn (unsigned)c-'0' &lt; 10; } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043f\u0438\u0440\u043e\u0433\u0438.<\/p>\n<p>  <i>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0441\u043f\u0430\u0441\u0438\u0431\u043e MaxGraey \u0437\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b.<\/i><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/520920\/\"> https:\/\/habr.com\/ru\/post\/520920\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/520920\/\">\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u0435\u043b \u0431\u0430\u0433-\u0440\u0435\u043f\u043e\u0440\u0442 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f Debian, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u0440\u043c\u0438\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0435\u0440\u0443\u043d\u0434\u0443 \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/git.sr.ht\/~sircmpwn\/scdoc\" rel=\"nofollow\">scdoc<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b <code>SIGSEGV<\/code>. \u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043c\u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>musl libc<\/code> \u0438 <code>glibc<\/code>. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0442\u0435\u043a\u0442\u0440\u0435\u0439\u0441:<\/p>\n<pre><code class=\"cmake\">==26267==ERROR: AddressSanitizer: SEGV on unknown address 0x7f9925764184 (pc 0x0000004c5d4d bp 0x000000000002 sp 0x7ffe7f8574d0 T0) ==26267==The signal is caused by a READ memory access.     0 0x4c5d4d in parse_text \/scdoc\/src\/main.c:223:61     1 0x4c476c in parse_document \/scdoc\/src\/main.c     2 0x4c3544 in main \/scdoc\/src\/main.c:763:2     3 0x7f99252ab0b2 in __libc_start_main \/build\/glibc-YYA7BZ\/glibc-2.31\/csu\/..\/csu\/libc-start.c:308:16     4 0x41b3fd in _start (\/scdoc\/scdoc+0x41b3fd) <\/code><\/pre>\n<p>  \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u043e\u0442 \u0447\u0442\u043e:<\/p>\n<pre><code class=\"cs\">if (!isalnum(last) || ((p-&gt;flags &amp; FORMAT_UNDERLINE) &amp;&amp; !isalnum(next))) { <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430: <code>p<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439, \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>last<\/code> \u0438 <code>next<\/code> \u0438\u043c\u0435\u044e\u0442 \u0442\u0438\u043f <code>uint32_t<\/code>. \u0421\u0435\u0433\u0444\u043e\u043b\u0442 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>isalnum<\/code>. \u0418, \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 glibc, \u043d\u043e \u043d\u0435 musl libc. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0432\u044b \u043d\u0435 \u043e\u0434\u0438\u043d\u043e\u043a\u0438: \u0442\u0443\u0442 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435\u0447\u0435\u043c\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0433\u0444\u043e\u043b\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310580","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=310580"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310580\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}