Task08:搜索

1. 视频题目

1.1 二分查找

1.1.1 描述

给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。

示例 1:

输入: nums = [-1,0,3,5,9,12], target = 9
输出: 4
解释: 9 出现在 nums 中并且下标为 4

示例 2:

输入: nums = [-1,0,3,5,9,12], target = 2
输出: -1
解释: 2 不存在 nums 中因此返回 -1

提示:

你可以假设 nums 中的所有元素是不重复的。
n 将在 [1, 10000]之间。
nums 的每个元素都将在 [-9999, 9999]之间。

1.1.2 代码

左右两个下标,分别在不同的情况下左移或者右移

class Solution:
    def search(self, nums: List[int], target: int) -> int:
        low = 0
        high = len(nums)-1
        while low<=high:
            mid = low+(high-low)//2
            # 取中点
            if nums[mid] == target:
                return mid
            # 找到即返回
            elif nums[mid] < target:
                low = mid+1
            # 中点偏小则右移
            else:
                high = mid-1
            # 中点偏大则右移
        return -1
1.1.3 总结

中止条件是左右指针错开,相等时仍旧符合条件

而且求中点最好用low+(high-low)//2,防止溢出

1.2 搜索旋转排序数组

1.2.1 描述

整数数组 nums 按升序排列,数组中的值 互不相同 。

在传递给函数之前,nums 在预先未知的某个下标 k(0 <= k < nums.length)上进行了 旋转,使数组变为 [nums[k], nums[k+1], …, nums[n-1], nums[0], nums[1], …, nums[k-1]](下标 从 0 开始 计数)。例如, [0,1,2,4,5,6,7] 在下标 3 处经旋转后可能变为 [4,5,6,7,0,1,2] 。

给你 旋转后 的数组 nums 和一个整数 target ,如果 nums 中存在这个目标值 target ,则返回它的下标,否则返回 -1 。

示例 1:

输入:nums = [4,5,6,7,0,1,2], target = 0
输出:4

示例 2:

输入:nums = [4,5,6,7,0,1,2], target = 3
输出:-1

示例 3:

输入:nums = [1], target = 0
输出:-1

提示:

1 <= nums.length <= 5000
-10^4 <= nums[i] <= 10^4
nums 中的每个值都 独一无二
题目数据保证 nums 在预先未知的某个下标上进行了旋转
-10^4 <= target <= 10^4

进阶:你可以设计一个时间复杂度为 O(log n) 的解决方案吗?

1.2.2 代码

其实如果直接暴力的话,是不是可以先把数组变有序,然后再找

就是直接找到开始旋转的点,然后重新拼接,然后再二分查找

说回不改变数组,也就是在原数组上查找,无非是多判断一些情况

大框架上与之前的二分一致,都是取中点比较与目标的大小,然后调整区间

这里需要注意的是,调整区间的时候,要主要此时左右哪个区间有序

也就是,比较完大小之后,下一步是判断有序区间,然后才是调整区间

class Solution:
    def search(self, nums: List[int], target: int) -> int:
        low = 0
        high = len(nums)-1
        while low<=high:
        # 当两点存在区间,允许相等
            mid = low + (high-low)//2
            # 取中点
            if nums[mid]==target :
                return mid
            # 相等则返回
            elif target<nums[mid] :
            # 如果目标值更小
                if nums[low]<=nums[mid]:
                # 如果是左有序的,允许相等
                    if nums[low]==target:
                        return low
                    # target比中点小
                    # 左有序,左比中点小
                    # 因此比较左端点和target
                    # 相等则返回
                    elif nums[low]<target:
                    # target比左端点大
                    # target比中点小
                    # 因此在左区间内
                        high = mid-1
                    else :
                    # 否则就是
                    # target比左端点小
                    # target比中点小
                    # 因此在右区间内
                        low = mid+1
                else:
                # 否则就是右有序的
                # target比中点小
                # 中点比右端点小
                # 因此在左区间内
                    high = mid-1
            else :
            # 如果目标值更大
                if nums[mid]<=nums[high]:
                # 如果是右有序的,允许相等
                    if nums[high]==target:
                        return high
                    # target比中点大
                    # 右有序,右比中点大
                    # 因此比较右端点和target
                    # 相等则返回
                    elif target < nums[high]:
                        low = mid+1
                    # target比中点大
                    # target比右端点小
                    # 右有序
                    # 因此在右区间内
                    else :
                        high = mid-1
                    # target比中点大
                    # target比右端点大
                    # 右有序
                    # 因此在左区间内
                else :
                # 否则就是左有序的
                    low = mid+1
                # target比中点大
                # target比左区间大
        return -1

还有一个精简的写法:

class Solution:
    def search(self, nums: List[int], target: int) -> int:
        if not nums:
            return -1
		# 数组为空
        l, r = 0, len(nums) - 1
        # 左右边界
        while l <= r:
            mid = (l + r) // 2
            # 中点
            if nums[mid] == target:
                return mid
            # 相等则返回
            if nums[0] <= nums[mid]:
            # 左有序情况
                if nums[0] <= target < nums[mid]:
                    r = mid - 1
                # 在有序区间内
                else:
                # 不再有序区间内
                    l = mid + 1
            else:
            # 右有序情况
                if nums[mid] < target <= nums[len(nums) - 1]:
                    l = mid + 1
                # 在有序区间内
                else:
                    r = mid - 1
                # 不再有序区间内
        return -1
1.2.3 总结

我之前的代码,在判断有序的时候,忘记加等号了,所以就报错了

也就是说,假如左区间像是[2,2,2,2,2,2],这是有序的,也就是符合nums[left]<=nums[mid]

我刚开始没发现问题,我还以为是步骤顺序的问题,因为我是先比较中值,再判断有序区间

而视频和题解的方案一般都是,先判断区间,再比较中值,后来发现不是这个的问题

所以在比较大小的时候,一定要注意相等的这个临界条件,不能随便地归给else

2. 作业题目

2.1 对称二叉树

2.1.1 描述

给你一个二叉树的根节点 root , 检查它是否轴对称。

示例 1:
在这里插入图片描述

输入:root = [1,2,2,3,4,4,3]
输出:true

示例 2:
在这里插入图片描述

输入:root = [1,2,2,null,3,null,3]
输出:false

提示:

树中节点数目在范围 [1, 1000] 内
-100 <= Node.val <= 100

进阶:你可以运用递归和迭代两种方法解决这个问题吗?

2.1.2 代码

我最开始的思路,直接就是层次遍历,广度优先搜索,然后就出问题了
在这里插入图片描述
像是示例二这种的,如果遍历到第三层,层内元素的值,正序等于逆序,程序认为合格

但是实际上来说,这两个数值相等的节点,一个在左一个在右,事实上是不对称的

对于这个bad case,我想到的解决办法是补充上另一边缺失的节点,但是需要另一边有值

也就是,如果左孩子缺失,此时检查右孩子,如果存在右孩子,那就补充左孩子

当时这么做,主要是考虑到要避免死循环,否则一直补充下去,无穷无尽,但是还不行

在这里插入图片描述
有这么一个bad case,由于左边的4和右边的5都没有孩子,所以说程序是不会给他们补充子女的

这也就导致了当遍历到叶子节点的这一层,程序会判断对称,但实际上叶子节点的父节点并不对称

所以问题可能还是出在对空节点数值的补充上,我想到之所以遍历不到空节点,是因为并没有将其入队

一般的广度优先搜索,会事先判断孩子是否为空,然后再将孩子入队,所以说就跳过了空节点的遍历

那遍历到空节点似乎也没什么问题吧,改为不检查是否为空,直接将非空节点左右孩子都给入队了

所以说遍历到空节点的时候,我们不访问起.val,而是随便加一个范围外的值,标识这个空节点

然后,就给,过了!过了!过了!我当时其实还是有点担忧下,例如下面这种情况

在这里插入图片描述

我原本是在想,如果在上面的基础上,再加一层,就像67这一层下面才是89这一层,会不会出问题

然后发现并不会,遍历到67的时候直接给过了,并且不影响89null,也不影响判断89的对称

所以说,当叶子节点在89这一层的时候,影响其对称的空节点,只跟67有关,与45无关

45对判断对称的影响,只到下一层,即67。一旦对称之后,再往下到89就无关了,补齐也是对称的

# Definition for a binary tree node.
# class TreeNode:
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution:
    def isSymmetric(self, root: TreeNode) -> bool:
        if not root:
            return True
        # 为空则直接返回
        queue = []
        queue.append(root)
        while queue :
            val = []
            size = len(queue)
            for _ in range(size):
                cur = queue.pop(0)
                if cur:
                    val.append(cur.val)
                    queue.append(cur.left)
                    queue.append(cur.right)
                else :
                    val.append(-200)
            if val != val[::-1]:
                return False
        return True

这是题解思路的代码,也是层次遍历,不过是交错将孩子入队,然后两两比较

class Solution(object):
	def isSymmetric(self, root):
		"""
		:type root: TreeNode
		:rtype: bool
		"""
		if not root or not (root.left or root.right):
			return True
		# 用队列保存节点	
		queue = [root.left,root.right]
		while queue:
			# 从队列中取出两个节点,再比较这两个节点
			left = queue.pop(0)
			right = queue.pop(0)
			# 如果两个节点都为空就继续循环,两者有一个为空就返回false
			if not (left or right):
				continue
			if not (left and right):
				return False
			if left.val!=right.val:
				return False
			# 将左节点的左孩子, 右节点的右孩子放入队列
			queue.append(left.left)
			queue.append(right.right)
			# 将左节点的右孩子,右节点的左孩子放入队列
			queue.append(left.right)
			queue.append(right.left)
		return True
2.1.3 总结

深度和广度优先的适用方向还是不同的,本题从广度的方向思考起来就比较直观

然后就是做题的时候一定要仔细思考题中给出的测试用例,寻找规律,再考虑特殊情况

这里其实是有点像,比较当前子树的叶子节点层的对称,所以说即便是空节点也要入队遍历

只不过是遍历访问到空节点的时候,将标记空节点的值放入列表,而不是节点的数值

2.2 二叉树的中序遍历

2.2.1 描述

给定一个二叉树的根节点 root ,返回它的 中序 遍历。

示例 1:

在这里插入图片描述

输入:root = [1,null,2,3]
输出:[1,3,2]

示例 2:
在这里插入图片描述

输入:root = []
输出:[]

示例 3:
在这里插入图片描述

输入:root = [1]
输出:[1]

示例 4:
在这里插入图片描述

输入:root = [1,2]
输出:[2,1]

示例 5:

在这里插入图片描述

输入:root = [1,null,2]
输出:[1,2]

提示:

树中节点数目在范围 [0, 100] 内
-100 <= Node.val <= 100

进阶: 递归算法很简单,你可以通过迭代算法完成吗?

2.2.2 代码

递归就很简单了,按照顺序访问就好。不为空了继续访问,为空就返回。

class Solution:
    def inorder(self,node):
        if not node:
            return
        self.inorder(node.left)
        self.res.append(node.val)
        self.inorder(node.right)
        
    def inorderTraversal(self, root: TreeNode) -> List[int]:
        self.res = []
        self.inorder(root)
        return self.res

迭代的话,需要显式地维护一个栈,这其实有点像Task05:树的视频里面提到的,访问次数的问题

WHITE是没有到达过,GRAY是第一次到达,第二次到达就将节点的数值加入列表

在这里插入图片描述

如果第一次到达一个节点就访问,那是前序,第二次是中序,第三次是后序

访问顺序照常,但是压栈的顺序要逆反过来,因为栈是先进后出

class Solution:
    def inorderTraversal(self, root: TreeNode) -> List[int]:
        WHITE, GRAY = 0, 1
        res = []
        stack = [(WHITE, root)]
        while stack:
            color, node = stack.pop()
            if node is None: continue
            if color == WHITE:
                stack.append((WHITE, node.right))
                stack.append((GRAY, node))
                stack.append((WHITE, node.left))
            else:
                res.append(node.val)
        return res
2.2.3 总结

如果第一次到达一个节点就访问,那是前序,第二次是中序,第三次是后序

2.3 二叉搜索树中第K小的元素

2.3.1 描述

给定一个二叉搜索树的根节点 root ,和一个整数 k ,请你设计一个算法查找其中第 k 个最小元素(从 1 开始计数)。

示例 1:

在这里插入图片描述

输入:root = [3,1,4,null,2], k = 1
输出:1

示例 2:
在这里插入图片描述

输入:root = [5,3,6,2,4,null,null,1], k = 3
输出:3

提示:

树中的节点数为 n 。
1 <= k <= n <= 104
0 <= Node.val <= 104

进阶:如果二叉搜索树经常被修改(插入/删除操作)并且你需要频繁地查找第 k 小的值,你将如何优化算法?

2.3.2 代码

二叉搜索树是一个有序的结构,其有序的访问应该是中序遍历,每遍历到一个点,计数-1即可

题解当中给的这个中序遍历还挺绕的,应该是迭代的写法,还是到达次数的那个思路

在这里插入图片描述

while循环第一次压入的是红色的那一列,包含了左孩子和父节点

于是栈顶每弹出一个元素访问后,就转向其右孩子

所以当红色序列访问到节点3后,while循环压入了黄色的序列

感觉不如递归的方式更加直观简洁

class Solution:
    def kthSmallest(self, root: TreeNode, k: int) -> int:
        stack = []
        while root or stack:
            while root:
                stack.append(root)
                root = root.left
            # 一值循环到最左的节点
            root = stack.pop()
            # 弹出当前节点
            k -= 1
            # 计数-1
            if k == 0:
                return root.val
            # 计数为0就返回
            root = root.right
            # 访问右子树
2.3.3 总结

二叉搜索树是一个有序的结构,其有序的访问应该是中序遍历

题中的进阶,我原本的思路是另外维护一个最小栈,但发现不行

因为这里是第k小,并不固定,可能前进也可能后退,极富变化

看题解是维护一个平衡搜索二叉树,其中的旋转步骤略难,还没看

结合log,帮我分析能不能找出1a4的蛛丝马迹:[2025-08-25 12:05:56] Unable to handle kernel NULL pointer dereference at virtual address 000001a4 [2025-08-25 12:08:34] pgd = c0014000 [2025-08-25 12:08:34] [000001a4] *pgd=00000000 [2025-08-25 12:08:34] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [2025-08-25 12:08:34] Modules linked in: domain_dns(O) init_addr( (null) - (null)), core_addr(bf379000 - bf37a538) [2025-08-25 12:08:34] qos_kctl(O) init_addr( (null) - (null)), core_addr(bf03e000 - bf03e03c) [2025-08-25 12:08:34] traffic_control(O) init_addr( (null) - (null)), core_addr(bf003000 - bf0033d4) [2025-08-25 12:08:34] app_dpi(O) init_addr( (null) - (null)), core_addr(bf8af000 - bf8b371c) [2025-08-25 12:08:34] xt_pctl(O) init_addr( (null) - (null)), core_addr(bf89f000 - bf8a70c0) [2025-08-25 12:08:34] blockingx(O) init_addr( (null) - (null)), core_addr(bf777000 - bf77a474) [2025-08-25 12:08:34] wl(P) init_addr( (null) - (null)), core_addr(bf3af000 - bf5b9830) [2025-08-25 12:08:34] neighbor_discover(O) init_addr( (null) - (null)), core_addr(bf3a3000 - bf3a61bc) [2025-08-25 12:08:34] tp_dhcp_hook(O) init_addr( (null) - (null)), core_addr(bf39e000 - bf39f044) [2025-08-25 12:08:34] Unable to handle kernel NULL pointer dereference at virtual address 00000098 [2025-08-25 12:08:34] pgd = cc6a4000 [2025-08-25 12:08:34] [00000098] *pgd=019ef831, *pte=00000000, *ppte=00000000 [2025-08-25 12:08:34] client_recognition(O) init_addr( (null) - (null)), core_addr(bf389000 - bf389560) [2025-08-25 12:08:34] app_classifier(O) init_addr( (null) - (null)), core_addr(bf383000 - bf3856f0) [2025-08-25 12:08:34] domain_libs(O) init_addr( (null) - (null)), core_addr(bf377000 - bf37746c) [2025-08-25 12:08:34] nf_conntrack_netlink init_addr( (null) - (null)), core_addr(bf36f000 - bf37335c) [2025-08-25 12:08:34] nf_conntrack_ipv6 init_addr( (null) - (null)), core_addr(bf36a000 - bf36ad64) [2025-08-25 12:08:34] nf_defrag_ipv6 init_addr( (null) - (null)), core_addr(bf363000 - bf363d74) [2025-08-25 12:08:34] ipt_TRIGGER(O) init_addr( (null) - (null)), core_addr(bf35f000 - bf35f4ec) [2025-08-25 12:08:34] xt_V6PORTS(O) init_addr( (null) - (null)), core_addr(bf35b000 - bf35bd04) [2025-08-25 12:08:34] xt_LOOPBACKDNAT(O) init_addr( (null) - (null)), core_addr(bf357000 - bf3577f8) [2025-08-25 12:08:34] xt_CHECKPORTS(PO) init_addr( (null) - (null)), core_addr(bf353000 - bf3531a8) [2025-08-25 12:08:34] nf_nat_tftp init_addr( (null) - (null)), core_addr(bf34f000 - bf34f07c) [2025-08-25 12:08:34] nf_conntrack_tftp init_addr( (null) - (null)), core_addr(bf34b000 - bf34b1a4) [2025-08-25 12:08:34] nf_nat_snmp_basic init_addr( (null) - (null)), core_addr(bf346000 - bf3472d4) [2025-08-25 12:08:34] nf_conntrack_snmp init_addr( (null) - (null)), core_addr(bf342000 - bf342080) [2025-08-25 12:08:34] nf_nat_sip init_addr( (null) - (null)), core_addr(bf33d000 - bf33e4f4) [2025-08-25 12:08:34] nf_conntrack_sip init_addr( (null) - (null)), core_addr(bf336000 - bf338908) [2025-08-25 12:08:34] nf_nat_pptp init_addr( (null) - (null)), core_addr(bf332000 - bf3323a8) [2025-08-25 12:08:34] nf_conntrack_pptp init_addr( (null) - (null)), core_addr(bf32e000 - bf32e878) [2025-08-25 12:08:34] nf_nat_h323 init_addr( (null) - (null)), core_addr(bf329000 - bf329dbc) [2025-08-25 12:08:34] nf_conntrack_h323 init_addr( (null) - (null)), core_addr(bf31d000 - bf32054c) [2025-08-25 12:08:34] nf_nat_proto_gre init_addr( (null) - (null)), core_addr(bf319000 - bf31912c) [2025-08-25 12:08:34] nf_conntrack_proto_gre init_addr( (null) - (null)), core_addr(bf315000 - bf315644) [2025-08-25 12:08:34] nf_nat_amanda init_addr( (null) - (null)), core_addr(bf311000 - bf311120) [2025-08-25 12:08:34] nf_conntrack_amanda init_addr( (null) - (null)), core_addr(bf30d000 - bf30d2d4) [2025-08-25 12:08:34] nf_conntrack_broadcast init_addr( (null) - (null)), core_addr(bf30b000 - bf30b174) [2025-08-25 12:08:34] nf_nat_irc init_addr( (null) - (null)), core_addr(bf307000 - bf307158) [2025-08-25 12:08:34] nf_conntrack_irc init_addr( (null) - (null)), core_addr(bf303000 - bf303448) [2025-08-25 12:08:34] nf_nat_ftp init_addr( (null) - (null)), core_addr(bf2ff000 - bf2ff1fc) [2025-08-25 12:08:34] nf_conntrack_ftp init_addr( (null) - (null)), core_addr(bf2fa000 - bf2faa30) [2025-08-25 12:08:34] xt_iprange init_addr( (null) - (null)), core_addr(bf2f6000 - bf2f6220) [2025-08-25 12:08:34] xt_quota init_addr( (null) - (null)), core_addr(bf2f2000 - bf2f20e0) [2025-08-25 12:08:34] xt_pkttype init_addr( (null) - (null)), core_addr(bf2ee000 - bf2ee09c) [2025-08-25 12:08:34] xt_owner init_addr( (null) - (null)), core_addr(bf2ea000 - bf2ea114) [2025-08-25 12:08:34] compat_xtables(O) init_addr( (null) - (null)), core_addr(bf2e8000 - bf2e8064) [2025-08-25 12:08:34] xt_REDIRECT init_addr( (null) - (null)), core_addr(bf2e4000 - bf2e406c) [2025-08-25 12:08:34] xt_NETMAP init_addr( (null) - (null)), core_addr(bf2e0000 - bf2e01f8) [2025-08-25 12:08:34] xt_nat init_addr( (null) - (null)), core_addr(bf2dc000 - bf2dc200) [2025-08-25 12:08:34] nf_nat_redirect init_addr( (null) - (null)), core_addr(bf2da000 - bf2da174) [2025-08-25 12:08:34] ipt_MASQUERADE init_addr( (null) - (null)), core_addr(bf2d6000 - bf2d6090) [2025-08-25 12:08:34] nf_nat_masquerade_ipv4 init_addr( (null) - (null)), core_addr(bf2d4000 - bf2d4634) [2025-08-25 12:08:34] iptable_nat init_addr( (null) - (null)), core_addr(bf2d0000 - bf2d0078) [2025-08-25 12:08:34] nf_nat_ipv4 init_addr( (null) - (null)), core_addr(bf2cc000 - bf2cca6c) [2025-08-25 12:08:34] nf_nat init_addr( (null) - (null)), core_addr(bf2c6000 - bf2c7908) [2025-08-25 12:08:34] xt_recent init_addr( (null) - (null)), core_addr(bf2c1000 - bf2c20bc) [2025-08-25 12:08:34] xt_helper init_addr( (null) - (null)), core_addr(bf2bd000 - bf2bd0f8) [2025-08-25 12:08:34] xt_connmark init_addr( (null) - (null)), core_addr(bf2b9000 - bf2b9190) [2025-08-25 12:08:34] xt_connbytes init_addr( (null) - (null)), core_addr(bf2b5000 - bf2b5268) [2025-08-25 12:08:34] pptp init_addr( (null) - (null)), core_addr(bf2ae000 - bf2af23c) [2025-08-25 12:08:34] xt_conntrack init_addr( (null) - (null)), core_addr(bf2aa000 - bf2aa59c) [2025-08-25 12:08:34] xt_CT init_addr( (null) - (null)), core_addr(bf2a6000 - bf2a657c) [2025-08-25 12:08:34] iptable_raw init_addr( (null) - (null)), core_addr(bf2a2000 - bf2a208c) [2025-08-25 12:08:34] xt_state init_addr( (null) - (null)), core_addr(bf29e000 - bf29e0a0) [2025-08-25 12:08:34] nf_conntrack_ipv4 init_addr( (null) - (null)), core_addr(bf298000 - bf299504) [2025-08-25 12:08:34] nf_defrag_ipv4 init_addr( (null) - (null)), core_addr(bf294000 - bf294110) [2025-08-25 12:08:34] nf_conntrack init_addr( (null) - (null)), core_addr(bf283000 - bf28c780) [2025-08-25 12:08:34] tpbr(O) init_addr( (null) - (null)), core_addr(bf265000 - bf2781a0) [2025-08-25 12:08:34] ipt_REJECT init_addr( (null) - (null)), core_addr(bf261000 - bf2610f8) [2025-08-25 12:08:34] xt_TCPMSS init_addr( (null) - (null)), core_addr(bf25d000 - bf25d674) [2025-08-25 12:08:34] xt_comment init_addr( (null) - (null)), core_addr(bf259000 - bf259014) [2025-08-25 12:08:34] xt_multiport init_addr( (null) - (null)), core_addr(bf255000 - bf255268) [2025-08-25 12:08:34] xt_mac init_addr( (null) - (null)), core_addr(bf251000 - bf251094) [2025-08-25 12:08:34] xt_limit init_addr( (null) - (null)), core_addr(bf24d000 - bf24d1a8) [2025-08-25 12:08:34] iptable_mangle init_addr( (null) - (null)), core_addr(bf249000 - bf249130) [2025-08-25 12:08:34] iptable_filter init_addr( (null) - (null)), core_addr(bf245000 - bf24508c) [2025-08-25 12:08:34] ip_tables init_addr( (null) - (null)), core_addr(bf240000 - bf241b20) [2025-08-25 12:08:34] ip_gre init_addr( (null) - (null)), core_addr(bf23b000 - bf23c55c) [2025-08-25 12:08:34] gre init_addr( (null) - (null)), core_addr(bf237000 - bf237848) [2025-08-25 12:08:34] tipc init_addr( (null) - (null)), core_addr(bf21f000 - bf231a54) [2025-08-25 12:08:34] sit init_addr( (null) - (null)), core_addr(bf218000 - bf21aa74) [2025-08-25 12:08:34] statistics(O) init_addr( (null) - (null)), core_addr(bf1df000 - bf1e1314) [2025-08-25 12:08:34] ts_fsm init_addr( (null) - (null)), core_addr(bf1db000 - bf1db564) [2025-08-25 12:08:34] ts_bm init_addr( (null) - (null)), core_addr(bf1d7000 - bf1d7330) [2025-08-25 12:08:34] ts_kmp init_addr( (null) - (null)), core_addr(bf1d3000 - bf1d3288) [2025-08-25 12:08:34] igs(P) init_addr( (null) - (null)), core_addr(bf1cd000 - bf1cee44) [2025-08-25 12:08:34] emf(P) init_addr( (null) - (null)), core_addr(bf1c6000 - bf1c8808) [2025-08-25 12:08:34] hnd init_addr( (null) - (null)), core_addr(bf18c000 - bf1b1fa0) [2025-08-25 12:08:34] cfg80211 init_addr( (null) - (null)), core_addr(bf165000 - bf183f34) [2025-08-25 12:08:34] otp(P) init_addr( (null) - (null)), core_addr(bf161000 - bf161444) [2025-08-25 12:08:34] pwrmngtd(P) init_addr( (null) - (null)), core_addr(bf15d000 - bf15d414) [2025-08-25 12:08:34] bcmvlan(P) init_addr( (null) - (null)), core_addr(bf148000 - bf154148) [2025-08-25 12:08:34] bcm_pcie_hcd init_addr( (null) - (null)), core_addr(bf13d000 - bf141794) [2025-08-25 12:08:34] bcm_enet init_addr( (null) - (null)), core_addr(bf120000 - bf133700) [2025-08-25 12:08:34] archer(P) init_addr( (null) - (null)), core_addr(bf0f5000 - bf10ddd0) [2025-08-25 12:08:34] cmdlist(P) init_addr( (null) - (null)), core_addr(bf0e3000 - bf0ee140) [2025-08-25 12:08:34] pktflow(P) init_addr( (null) - (null)), core_addr(bf047000 - bf06cfc0) [2025-08-25 12:08:34] bcmlibs(P) init_addr( (null) - (null)), core_addr(bf040000 - bf0422d0) [2025-08-25 12:08:34] chipinfo(P) init_addr( (null) - (null)), core_addr(bf03c000 - bf03c108) [2025-08-25 12:08:34] bcm_ingqos(P) init_addr( (null) - (null)), core_addr(bf005000 - bf00833c) [2025-08-25 12:08:34] wlcsm(P) init_addr( (null) - (null)), core_addr(bf000000 - bf000ccc) [2025-08-25 12:08:34] [last unloaded: safesearch_dns] [2025-08-25 12:08:34] CPU: 0 PID: 0 Comm: EC&B& Tainted: P O 4.1.52 #1 [2025-08-25 12:08:34] Hardware name: Generic DT based system [2025-08-25 12:08:34] task: c7263ff0 ti: c7264000 task.ti: c7263fd8 [2025-08-25 12:08:34] pc : [<c0027610>] lr : [<c001926c>] psr: 10070193 [2025-08-25 12:08:34] sp : c7266110 ip : 00000000 fp : 000000b4 [2025-08-25 12:08:34] r10: c7e0be00 r9 : 00000017 r8 : cf805000 [2025-08-25 12:08:34] r7 : 00000000 r6 : 000001a4 r5 : 000001a4 r4 : c72661e8 [2025-08-25 12:08:34] r3 : 10070193 r2 : c72661e8 r1 : 00000017 r0 : 000001a4 [2025-08-25 12:08:34] Flags: nzcV IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [2025-08-25 12:08:34] Control: 10c5387d Table: 0337404a DAC: 00000015 [2025-08-25 12:08:34] Process EC&B& (pid: 0, stack limit = 0xc72641e8) [2025-08-25 12:08:34] Stack: (0xc7266110 to 0xc7265fd8) [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc72661e8 to 0xc7266230) [2025-08-25 12:08:34] 61e0: 000001a4 00000017 c7266308 10070193 c7266308 000001a4 [2025-08-25 12:08:34] 6200: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266230 [2025-08-25 12:08:34] 6220: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc7266308 to 0xc7266350) [2025-08-25 12:08:34] 6300: 000001a4 00000017 c7266428 10070193 c7266428 000001a4 [2025-08-25 12:08:34] 6320: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266350 [2025-08-25 12:08:34] [fkb_pctl_check:4511]Leave a fkb to the default Linux stack [2025-08-25 12:08:34] 6340: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc7266428 to 0xc7266470) [2025-08-25 12:08:34] 6420: 000001a4 00000017 c7266548 10070193 c7266548 000001a4 [2025-08-25 12:08:34] 6440: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266470 [2025-08-25 12:08:34] 6460: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc7266548 to 0xc7266590) [2025-08-25 12:08:34] 6540: 000001a4 00000017 c7266668 10070193 c7266668 000001a4 [2025-08-25 12:08:34] 6560: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266590 [2025-08-25 12:08:34] 6580: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc7266668 to 0xc72666b0) [2025-08-25 12:08:34] 6660: 000001a4 00000017 c7266788 10070193 c7266788 000001a4 [2025-08-25 12:08:34] 6680: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72666b0 [2025-08-25 12:08:34] 66a0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc7266788 to 0xc72667d0) [2025-08-25 12:08:34] 6780: 000001a4 00000017 c72668a8 10070193 c72668a8 000001a4 [2025-08-25 12:08:34] 67a0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72667d0 [2025-08-25 12:08:34] 67c0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:34] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:34] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:34] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:34] Exception stack(0xc72668a8 to 0xc72668f0) [2025-08-25 12:08:34] 68a0: 000001a4 00000017 c72669c8 10070193 c72669c8 000001a4 [2025-08-25 12:08:35] 68c0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72668f0 [2025-08-25 12:08:35] 68e0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc72669c8 to 0xc7266a10) [2025-08-25 12:08:35] 69c0: 000001a4 00000017 c7266ae8 10070193 c7266ae8 000001a4 [2025-08-25 12:08:35] 69e0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266a10 [2025-08-25 12:08:35] 6a00: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7266ae8 to 0xc7266b30) [2025-08-25 12:08:35] 6ae0: 000001a4 00000017 c7266c08 10070193 c7266c08 000001a4 [2025-08-25 12:08:35] 6b00: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266b30 [2025-08-25 12:08:35] 6b20: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7266c08 to 0xc7266c50) [2025-08-25 12:08:35] 6c00: 000001a4 00000017 c7266d28 10070193 c7266d28 000001a4 [2025-08-25 12:08:35] 6c20: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266c50 [2025-08-25 12:08:35] 6c40: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7266d28 to 0xc7266d70) [2025-08-25 12:08:35] 6d20: 000001a4 00000017 c7266e48 10070193 c7266e48 000001a4 [2025-08-25 12:08:35] 6d40: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266d70 [2025-08-25 12:08:35] 6d60: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7266e48 to 0xc7266e90) [2025-08-25 12:08:35] 6e40: 000001a4 00000017 c7266f68 10070193 c7266f68 000001a4 [2025-08-25 12:08:35] 6e60: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266e90 [2025-08-25 12:08:35] 6e80: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7266f68 to 0xc7266fb0) [2025-08-25 12:08:35] 6f60: 000001a4 00000017 c7267088 10070193 c7267088 000001a4 [2025-08-25 12:08:35] 6f80: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7266fb0 [2025-08-25 12:08:35] 6fa0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267088 to 0xc72670d0) [2025-08-25 12:08:35] 7080: 000001a4 00000017 c72671a8 10070193 c72671a8 000001a4 [2025-08-25 12:08:35] 70a0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72670d0 [2025-08-25 12:08:35] 70c0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc72671a8 to 0xc72671f0) [2025-08-25 12:08:35] 71a0: 000001a4 00000017 c72672c8 10070193 c72672c8 000001a4 [2025-08-25 12:08:35] 71c0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72671f0 [2025-08-25 12:08:35] 71e0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc72672c8 to 0xc7267310) [2025-08-25 12:08:35] 72c0: 000001a4 00000017 c72673e8 10070193 c72673e8 000001a4 [2025-08-25 12:08:35] 72e0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267310 [2025-08-25 12:08:35] 7300: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc72673e8 to 0xc7267430) [2025-08-25 12:08:35] 73e0: 000001a4 00000017 c7267508 10070193 c7267508 000001a4 [2025-08-25 12:08:35] 7400: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267430 [2025-08-25 12:08:35] 7420: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267508 to 0xc7267550) [2025-08-25 12:08:35] 7500: 000001a4 00000017 c7267628 10070193 c7267628 000001a4 [2025-08-25 12:08:35] 7520: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267550 [2025-08-25 12:08:35] 7540: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267628 to 0xc7267670) [2025-08-25 12:08:35] 7620: 000001a4 00000017 c7267748 10070193 c7267748 000001a4 [2025-08-25 12:08:35] 7640: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267670 [2025-08-25 12:08:35] 7660: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267748 to 0xc7267790) [2025-08-25 12:08:35] 7740: 000001a4 00000017 c7267868 10070193 c7267868 000001a4 [2025-08-25 12:08:35] 7760: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267790 [2025-08-25 12:08:35] 7780: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267868 to 0xc72678b0) [2025-08-25 12:08:35] 7860: 000001a4 00000017 c7267988 10070193 c7267988 000001a4 [2025-08-25 12:08:35] 7880: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72678b0 [2025-08-25 12:08:35] 78a0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267988 to 0xc72679d0) [2025-08-25 12:08:35] 7980: 000001a4 00000017 c7267aa8 10070193 c7267aa8 000001a4 [2025-08-25 12:08:35] 79a0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c72679d0 [2025-08-25 12:08:35] 79c0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267aa8 to 0xc7267af0) [2025-08-25 12:08:35] 7aa0: 000001a4 00000017 c7267bc8 10070193 c7267bc8 000001a4 [2025-08-25 12:08:35] 7ac0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267af0 [2025-08-25 12:08:35] 7ae0: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267bc8 to 0xc7267c10) [2025-08-25 12:08:35] 7bc0: 000001a4 00000017 c7267ce8 10070193 c7267ce8 000001a4 [2025-08-25 12:08:35] 7be0: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267c10 [2025-08-25 12:08:35] 7c00: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267ce8 to 0xc7267d30) [2025-08-25 12:08:35] 7ce0: 000001a4 00000017 c7267e08 10070193 c7267e08 000001a4 [2025-08-25 12:08:35] 7d00: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267d30 [2025-08-25 12:08:35] 7d20: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267e08 to 0xc7267e50) [2025-08-25 12:08:35] 7e00: 000001a4 00000017 c7267f28 10070193 c7267f28 000001a4 [2025-08-25 12:08:35] 7e20: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267e50 [2025-08-25 12:08:35] 7e40: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Function entered at [<c001926c>] from [<c0022818>] [2025-08-25 12:08:35] Exception stack(0xc7267f28 to 0xc7267f70) [2025-08-25 12:08:35] 7f20: 000001a4 00000017 c7268048 10070193 c7268048 000001a4 [2025-08-25 12:08:35] 7f40: 000001a4 00000000 cf805000 00000017 c7e0be00 000000b4 00000000 c7267f70 [2025-08-25 12:08:35] 7f60: c001926c c0027610 10070193 ffffffff [2025-08-25 12:08:35] Function entered at [<c0022818>] from [<c0027610>] [2025-08-25 12:08:35] Function entered at [<c0027610>] from [<c001926c>] [2025-08-25 12:08:35] Code: e1a04002 e593700c e5923040 e3130080 (e59781a4) [2025-08-25 12:08:35] ---[ end trace e3ef0a366f911257 ]--- [2025-08-25 12:08:35] Internal error: Oops: 17 [#2] PREEMPT SMP ARM [2025-08-25 12:08:35] Modules linked in: domain_dns(O) init_addr( (null) - (null)), core_addr(bf379000 - bf37a538) [2025-08-25 12:08:35] SMP: failed to stop secondary CPUs [2025-08-25 12:08:36] Rebooting in 3 seconds.. [2025-08-25 12:08:36] SMP: failed to stop secondary CPUs [2025-08-25 12:08:40] kerSysSoftReset: called on cpu 1 [2025-08-25 12:08:40] ----
09-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值