Magma block does not hurt the player if the player is sneaking on top of it. So, the player can go on top of it without any damage by sneaking.
Linked issues
Comments

Magma block does not hurt the player if the player is sneaking on top of it. So, the player can go on top of it without any damage by sneaking.
migrated
(Unassigned)
Unconfirmed
Minecraft 16w21b, Minecraft 1.10 Pre-Release 1
Retrieved
Works as intended. also happens with frost walker enchantment.