Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ae728e51
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ae728e51
编写于
8月 14, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Debug output for SANITIZE_MEM()
上级
41895506
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
23 addition
and
11 deletion
+23
-11
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+23
-11
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
ae728e51
...
@@ -179,9 +179,20 @@ _hb_sanitize_check (SANITIZE_ARG_DEF,
...
@@ -179,9 +179,20 @@ _hb_sanitize_check (SANITIZE_ARG_DEF,
const
char
*
base
,
const
char
*
base
,
unsigned
int
len
)
unsigned
int
len
)
{
{
return
context
->
start
<=
base
&&
bool
ret
=
context
->
start
<=
base
&&
base
<=
context
->
end
&&
base
<=
context
->
end
&&
(
unsigned
int
)
(
context
->
end
-
base
)
>=
len
;
(
unsigned
int
)
(
context
->
end
-
base
)
>=
len
;
#if HB_DEBUG
if
(
sanitize_depth
<
HB_DEBUG
)
\
fprintf
(
stderr
,
"SANITIZE(%p) %-*d-> check [%p..%p] (%d bytes) in [%p..%p] -> %s
\n
"
,
\
base
,
sanitize_depth
,
sanitize_depth
,
base
,
base
+
len
,
len
,
context
->
start
,
context
->
end
,
ret
?
"pass"
:
"FAIL"
);
#endif
return
ret
;
}
}
static
HB_GNUC_UNUSED
inline
bool
static
HB_GNUC_UNUSED
inline
bool
...
@@ -193,12 +204,13 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF,
...
@@ -193,12 +204,13 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF,
context
->
edit_count
++
;
context
->
edit_count
++
;
#if HB_DEBUG
#if HB_DEBUG
fprintf
(
stderr
,
"sanitize %p edit %u requested for [%p..%p] (%d bytes) in [%p..%p] -> %s
\n
"
,
fprintf
(
stderr
,
"SANITIZE(%p) %-*d-> edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s
\n
"
,
\
context
->
blob
,
base
,
sanitize_depth
,
sanitize_depth
,
context
->
edit_count
,
context
->
edit_count
,
base
,
base
+
len
,
len
,
base
,
base
+
len
,
len
,
context
->
start
,
context
->
end
,
context
->
start
,
context
->
end
,
perm
?
"granted"
:
"rejected
"
);
perm
?
"granted"
:
"REJECTED
"
);
#endif
#endif
return
perm
;
return
perm
;
}
}
...
@@ -257,7 +269,7 @@ struct Sanitizer
...
@@ -257,7 +269,7 @@ struct Sanitizer
sane
=
t
->
sanitize
(
SANITIZE_ARG_INIT
);
sane
=
t
->
sanitize
(
SANITIZE_ARG_INIT
);
if
(
context
.
edit_count
)
{
if
(
context
.
edit_count
)
{
#if HB_DEBUG
#if HB_DEBUG
fprintf
(
stderr
,
"Sanitizer %p requested %d edits in second round;
failing
%s
\n
"
,
fprintf
(
stderr
,
"Sanitizer %p requested %d edits in second round;
FAILLING
%s
\n
"
,
blob
,
context
.
edit_count
,
__PRETTY_FUNCTION__
);
blob
,
context
.
edit_count
,
__PRETTY_FUNCTION__
);
#endif
#endif
sane
=
false
;
sane
=
false
;
...
@@ -277,7 +289,7 @@ struct Sanitizer
...
@@ -277,7 +289,7 @@ struct Sanitizer
}
}
#if HB_DEBUG
#if HB_DEBUG
fprintf
(
stderr
,
"Sanitizer %p %s %s
\n
"
,
blob
,
sane
?
"passed"
:
"
failed
"
,
__PRETTY_FUNCTION__
);
fprintf
(
stderr
,
"Sanitizer %p %s %s
\n
"
,
blob
,
sane
?
"passed"
:
"
FAILED
"
,
__PRETTY_FUNCTION__
);
#endif
#endif
if
(
sane
)
if
(
sane
)
return
blob
;
return
blob
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录