# Custom pointer typedef bug

**URL:** <https://community.hex-rays.com/t/custom-pointer-typedef-bug/516>\
**Category:** Bugs\
**Created:** [October 6, 2025, 7:18pm UTC](https://community.hex-rays.com/t/custom-pointer-typedef-bug/516 "2025-10-06T19:18:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuiozank](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/yuiozank/32/293_2.png) [@yuiozank](https://community.hex-rays.com/u/yuiozank)\
**Post date:** [October 6, 2025, 7:18pm UTC](https://community.hex-rays.com/t/custom-pointer-typedef-bug/516/1 "2025-10-06T19:18:09Z")

</div>

Hello,

I would like to report a bug.

I’ve declared a new type named swiftptr:  
`typedef int swiftptr __offset(OFF32|SIGNEDOP|SELFREF);`

It’s a pointer I’ll use in Swift, which is 32 bit signed offset from current position in memory which is used in Swift pretty often. I didn’t want to assign operand type to custom offset every time so I defined it for a convenience.

The problem is, after declaring such typedef, after applying it once in disassembly `(disassembly view->set type(Y key)->swiftptr)`, IDA sets the `swiftptr` type to `typedef int swiftptr` which is no longer an offset.

Changing it back to desired type and applying the type again anywhere in disassembly repeats the problem.

---

<div class="post-metadata">

**Author:** ![teresa\_hexrays](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/teresa_hexrays/32/11_2.png) [@teresa\_hexrays](https://community.hex-rays.com/u/teresa_hexrays)\
**Post date:** [October 8, 2025, 12:32pm UTC](https://community.hex-rays.com/t/custom-pointer-typedef-bug/516/2 "2025-10-08T12:32:17Z")

</div>

Hi @yuiozank,

Thanks for reporting this issue. Just a quick update - you can expect a fix in the upcoming IDA 9.3 release.
